3v4l.org

run code in 300+ PHP versions simultaneously
<?php $client = new stdClass(); $client->Get = function($path) use($client) { echo $client->GetAccessToken(); } $client->GetAccessToken = function() use($client) { return 'bar'; } $client->Get();
Output for 5.5.24 - 5.5.30, 5.6.8 - 5.6.16, 7.0.0
Parse error: syntax error, unexpected '$client' (T_VARIABLE) in /in/Y7vgB on line 7
Process exited with code 255.

preferences:
160.96 ms | 1395 KiB | 24 Q