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' ] ] ]; $output = json_encode($arr, JSON_UNESCAPED_SLASHES); $output = str_replace('[', '{', $output); $output = str_replace(']', '}', $output); $output = str_replace(':', '=', $output); $output = str_replace(',', ';', $output); // $output = str_replace('[', '{', $output); var_dump($output); var_dump(' c_encrypted ={ c_customer ={ customer/company ID }; c_brand ={ brandname }; c_productname ={ product displayname }; c_eventtype ={ click / premium click };}');
based on i3b4M
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.2.0
string(158) "{"c_encrypted"={"c_customer"={"customer/company ID"};"c_brand"={"brandname"};"c_productname"={"product displayname"};"c_eventtype"={"click / premium click"}}}" string(158) " c_encrypted ={ c_customer ={ customer/company ID }; c_brand ={ brandname }; c_productname ={ product displayname }; c_eventtype ={ click / premium click };}"