3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $command = array( 'sys_type' => 'PIS', 'list_type' => 'server_online', 'list_id' => 1234567, 'opcode' => 'recv', 'cksum' => strtoupper(md5('PIS'.'server_online1234567recv')), 'aop' => '', 'operation' => array('CHANGE_DNS'), 'dev_table' => 'server_info', 'attrs' => array('pis1'=>array( 'country' => 'China', 'area'=>'', 'city'=>'', 'wh'=>'TC', 'other'=>'', )), 'args' => array('pis1'=>array( 'id' => 333, 'rdtype' => 'a', 'unusual_chk' =>array('status'=>0), 'power' => 2, 'add' => array(array( 'domain'=>'pistest01.testing.vm.baidu.com.', 'ttl'=>3600, 'class'=>'in', 'rdata'=>'10.22.33.11', )), )), ); $return1=array( 'status'=>0, 'job_id' =>111, 'message'=> array( $sn=>array('status' =>0, 'message' =>'成功发送命令', 'uuid'=>123,), $sn=>array('status' =>1, 'message' =>'错误原因', 'uuid'=>'',) ) ); $return2=array('status'=>1,'message'=>''); print json_encode($command); print json_encode($return1); print json_encode($return2);
Output for 7.0.0 - 7.1.0
Notice: Undefined variable: sn in /in/fTR50 on line 32 Notice: Undefined variable: sn in /in/fTR50 on line 32 {"sys_type":"PIS","list_type":"server_online","list_id":1234567,"opcode":"recv","cksum":"2C91428CA43A11273A94752703A442A7","aop":"","operation":["CHANGE_DNS"],"dev_table":"server_info","attrs":{"pis1":{"country":"China","area":"","city":"","wh":"TC","other":""}},"args":{"pis1":{"id":333,"rdtype":"a","unusual_chk":{"status":0},"power":2,"add":[{"domain":"pistest01.testing.vm.baidu.com.","ttl":3600,"class":"in","rdata":"10.22.33.11"}]}}}{"status":0,"job_id":111,"message":{"":{"status":1,"message":"\u9519\u8bef\u539f\u56e0","uuid":""}}}{"status":1,"message":""}
Output for 5.2.2 - 5.6.28
Notice: Undefined variable: sn in /in/fTR50 on line 38 Notice: Undefined variable: sn in /in/fTR50 on line 42 {"sys_type":"PIS","list_type":"server_online","list_id":1234567,"opcode":"recv","cksum":"2C91428CA43A11273A94752703A442A7","aop":"","operation":["CHANGE_DNS"],"dev_table":"server_info","attrs":{"pis1":{"country":"China","area":"","city":"","wh":"TC","other":""}},"args":{"pis1":{"id":333,"rdtype":"a","unusual_chk":{"status":0},"power":2,"add":[{"domain":"pistest01.testing.vm.baidu.com.","ttl":3600,"class":"in","rdata":"10.22.33.11"}]}}}{"status":0,"job_id":111,"message":{"":{"status":1,"message":"\u9519\u8bef\u539f\u56e0","uuid":""}}}{"status":1,"message":""}
Output for 5.2.0 - 5.2.1
Notice: Undefined variable: sn in /in/fTR50 on line 38 Notice: Undefined variable: sn in /in/fTR50 on line 42 {"sys_type":"PIS","list_type":"server_online","list_id":1234567,"opcode":"recv","cksum":"2C91428CA43A11273A94752703A442A7","aop":"","operation":["CHANGE_DNS"],"dev_table":"server_info","attrs":{"pis1":{"country":"China","area":"","city":"","wh":"TC","other":""}},"args":{"pis1":{"id":333,"rdtype":"a","unusual_chk":{"status":0},"power":2,"add":[{"domain":"pistest01.testing.vm.baidu.com.","ttl":3600,"class":"in","rdata":"10.22.33.11"}]}}}{"status":0,"job_id":111,"message":{}}{"status":1,"message":""}
Output for 5.1.0 - 5.1.6
Notice: Undefined variable: sn in /in/fTR50 on line 38 Notice: Undefined variable: sn in /in/fTR50 on line 42 Fatal error: Call to undefined function json_encode() in /in/fTR50 on line 45
Process exited with code 255.
Output for 5.0.4 - 5.0.5
Notice: Undefined variable: sn in /in/fTR50 on line 36 Notice: Undefined variable: sn in /in/fTR50 on line 39 Fatal error: Call to undefined function json_encode() in /in/fTR50 on line 45
Process exited with code 255.
Output for 5.0.0 - 5.0.3
Notice: Undefined variable: sn in /in/fTR50 on line 36 Notice: Undefined variable: sn in /in/fTR50 on line 39 Fatal error: Call to undefined function json_encode() in /in/fTR50 on line 45
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Notice: Undefined variable: sn in /in/fTR50 on line 36 Notice: Undefined variable: sn in /in/fTR50 on line 39 Fatal error: Call to undefined function: json_encode() in /in/fTR50 on line 45
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Notice: Undefined variable: sn in /in/fTR50 on line 36 Notice: Undefined variable: sn in /in/fTR50 on line 39 Fatal error: Call to undefined function: json_encode() in /in/fTR50 on line 45
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Notice: Undefined variable: sn in /in/fTR50 on line 36 Notice: Undefined variable: sn in /in/fTR50 on line 39 Fatal error: Call to undefined function: json_encode() in /in/fTR50 on line 45