3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $arr = [ 'c_encrypted' => [ 'c_customer' => [ 'customer/company ID' ], 'c_brand' => [ 'brandname' ], 'c_productname' => [ 'product displayname' ], 'c_eventtype' => [ 'click / premium click' ] ] ]; var_dump(json_encode($arr)); var_dump(['expected' => ' c_encrypted ={ c_customer ={ customer /company ID }; c_brand ={ brandname }; c_productname ={ product displayname }; c_eventtype ={ click / premium click };}']);
based on m71fR
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.2.0
string(160) "{"c_encrypted":{"c_customer":["customer\/company ID"],"c_brand":["brandname"],"c_productname":["product displayname"],"c_eventtype":["click \/ premium click"]}}" array(1) { ["expected"]=> string(160) " c_encrypted ={ c_customer ={ customer /company ID }; c_brand ={ brandname }; c_productname ={ product displayname }; c_eventtype ={ click / premium click };}" }