3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $user = "user@gmail.com"; $pass = "pass"; //Thông tin APP facebook $secretkey = "62f8ce9f74b12f84c123cc23437a4a32"; $api_key = "882a8490361da98702bf97a021ddc14d"; function tao_sig($postdata){ global $secretkey; $textsig = ""; foreach($postdata as $key => $value){ $textsig .= "$key=$value"; } $textsig .= $secretkey; //$textsig = md5($textsig); return $textsig; } $postdata = array( "api_key" => $api_key, "email" => $user, "format" => "JSON", "locale" => "vi_vn", "method" => "auth.login", "password" => $pass, "return_ssl_resources" => "0", "v" => "1.0" ); $tan=array('tan','khoa') $test=tao_sig($tan) echo $test;
based on EGGM9
Output for 5.6.0 - 5.6.30, 7.0.0 - 7.1.6
Parse error: syntax error, unexpected '$test' (T_VARIABLE) in /in/St8pq on line 32
Process exited with code 255.
Output for hhvm-3.15.4
Fatal error: Uncaught Error: syntax error, unexpected T_VARIABLE in /in/St8pq:32 Stack trace: #0 {main}
Process exited with code 255.