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, JSON_UNESCAPED_SLASHES | JSON_FORCE_OBJECT)); var_dump(' c_encrypted ={ c_customer ={ customer/company ID }; c_brand ={ brandname }; c_productname ={ product displayname }; c_eventtype ={ click / premium click };}');
based on A3KUO
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.2.0
string(174) "{"c_encrypted":{"c_customer":{"0":"customer/company ID"},"c_brand":{"0":"brandname"},"c_productname":{"0":"product displayname"},"c_eventtype":{"0":"click / premium click"}}}" string(158) " c_encrypted ={ c_customer ={ customer/company ID }; c_brand ={ brandname }; c_productname ={ product displayname }; c_eventtype ={ click / premium click };}"