3v4l.org

run code in 200+ PHP versions simultaneously
<?php $array = [ "page_title" => "contact us", "val" => [ "pattern" => "/email/\s+us\s*(.*?)/\s/", "type" => "1" ] ]; echo json_encode($array);
Output for 7.2.0 - 7.4.6
{"page_title":"contact us","val":{"pattern":"\/email\/\\s+us\\s*(.*?)\/\\s\/","type":"1"}}