3v4l.org

run code in 300+ PHP versions simultaneously
<?php $games = json_decode($data, true); $gamesnum = count($games['data']['games']['game']); $gamesnum = $gamesnum-1; $home_team = ''; $away_team = ''; for ($i=$gamesnum;$i>=0;$i--) { $home_name_abbrev[$i]= $games['data']['games']['game'][$i]['home_name_abbrev']; $hometeam[$i]= $games['data']['games']['game'][$i]['home_team_name']; $away_name_abbrev[$i]= $games['data']['games']['game'][$i]['away_name_abbrev']; $awayteam[$i]= $games['data']['games']['game'][$i]['away_team_name']; $status[$i] = $games['data']['games']['game'][$i]['status']; $etime[$i] = $games['data']['games']['game'][$i]['first_pitch_et']; $time = strtotime($etime[$i]); $startTime = date("h:i", strtotime('-30 minutes', $time)); $ampm[$i] = $games['data']['games']['game'][$i]['ampm']; $league[$i] = $games['data']['games']['game'][$i]['league']; }
Output for git.master, git.master_jit
Warning: Undefined variable $data in /in/iOmoO on line 3 Deprecated: json_decode(): Passing null to parameter #1 ($json) of type string is deprecated in /in/iOmoO on line 3 Warning: Trying to access array offset on value of type null in /in/iOmoO on line 4 Warning: Trying to access array offset on value of type null in /in/iOmoO on line 4 Warning: Trying to access array offset on value of type null in /in/iOmoO on line 4 Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /in/iOmoO:4 Stack trace: #0 {main} thrown in /in/iOmoO on line 4
Process exited with code 255.
Output for rfc.property-hooks
Warning: Undefined variable $data in /in/iOmoO on line 3 Deprecated: json_decode(): Passing null to parameter #1 ($json) of type string is deprecated in /in/iOmoO on line 3 Warning: Trying to access array offset on null in /in/iOmoO on line 4 Warning: Trying to access array offset on null in /in/iOmoO on line 4 Warning: Trying to access array offset on null in /in/iOmoO on line 4 Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /in/iOmoO:4 Stack trace: #0 {main} thrown in /in/iOmoO on line 4
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
57.79 ms | 401 KiB | 8 Q