3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php echo json_encode([ "id" => $user->id, "trial" => $trial, "expires" => $time_left, "devices" => [ "current" => (int)$count, "max" => 6 ], "referral_url" => $this->MakeUserReferralUrl($user->id), "settings" => $settings, "ip_address" => $ip, "latitude" => $latitude, "longitude" => $longitude, "country_code" => $countryCode, ]);
Output for 7.2.0
Notice: Undefined variable: user in /in/flBZs on line 4 Notice: Trying to get property 'id' of non-object in /in/flBZs on line 4 Notice: Undefined variable: trial in /in/flBZs on line 5 Notice: Undefined variable: time_left in /in/flBZs on line 6 Notice: Undefined variable: count in /in/flBZs on line 8 Fatal error: Uncaught Error: Using $this when not in object context in /in/flBZs:11 Stack trace: #0 {main} thrown in /in/flBZs on line 11
Process exited with code 255.
Output for 7.0.0 - 7.1.10
Notice: Undefined variable: user in /in/flBZs on line 4 Notice: Trying to get property of non-object in /in/flBZs on line 4 Notice: Undefined variable: trial in /in/flBZs on line 5 Notice: Undefined variable: time_left in /in/flBZs on line 6 Notice: Undefined variable: count in /in/flBZs on line 8 Fatal error: Uncaught Error: Using $this when not in object context in /in/flBZs:11 Stack trace: #0 {main} thrown in /in/flBZs on line 11
Process exited with code 255.
Output for 5.5.0 - 5.6.28
Notice: Undefined variable: user in /in/flBZs on line 4 Notice: Trying to get property of non-object in /in/flBZs on line 4 Notice: Undefined variable: trial in /in/flBZs on line 5 Notice: Undefined variable: time_left in /in/flBZs on line 6 Notice: Undefined variable: count in /in/flBZs on line 8 Fatal error: Using $this when not in object context in /in/flBZs on line 11
Process exited with code 255.