@@ -341,6 +341,12 @@ class Serializer {
buf.add(chars.length);
buf.add(":");
buf.add(chars);
+ #elseif php
+ var chars = new String(php.Global.base64_encode(v.getData()));
+ buf.add("s");
+ buf.add(chars.length);
+ buf.add(":");
+ buf.add(chars);
#else
buf.add("s");
buf.add(Math.ceil((v.length * 8) / 6));
@@ -388,6 +388,8 @@ class Unserializer {
throw "Invalid bytes length";
#if neko
var bytes = haxe.io.Bytes.ofData(base_decode(untyped buf.substr(pos, len).__s, untyped BASE64.__s));
+ var bytes = haxe.io.Bytes.ofData(php.Global.base64_decode(buf.substr(pos, len)));
var codes = CODES;
if (codes == null) {