I think that this is probably not a bug, but my misuse, that’s why I decided to post it here instead of creating a new issue.
The error I am getting when compiling Haxe to PHP is “php.NativeString has no field substr”.
In our project we had to override standard Haxe implementation of JSON parsing (it was related the case described in https://github.com/HaxeFoundation/haxe/issues/9203). More specifically, we’ve overridden class
JsonParser and internal function
In the standard library there is a call to
String.substr method (https://github.com/HaxeFoundation/haxe/blob/development/std/haxe/format/JsonParser.hx#L303). But the same code fails to compile when I use it in my overridden class.
I’ve tried providing
-D haxeJSON flag to Haxe compiler, but it didn’t help.
BTW, our solution works fine with JS, Java and Python.
Maybe there is some flag that I am missing which allows to disable using of
php.NativeString or maybe there is some better solution?