3v4l.org

run code in 300+ PHP versions simultaneously
<?php $movie_list = <<<DATA { "type" : ["movie", "movie", "movie", "tv_show"], "year" : ["2018", "2018", "2018", null ], "movies" : ["Movie 1", "Movie 2", "Movie 3", "TV Show 1"], "season_num" : [null, null, null, "5"], "episode_num" : [null, null, null, "5"], "times" : ["6390.629196248", "6542.58813267", "1988.046243357", "766.892506912"] } DATA; $movie_list = json_decode($movie_list, true); function iterate_movies($movies) { foreach ($movies['movies'] as $i => $name) { $movie = ['name' => $name]; foreach (['type', 'year', 'season_num', 'episode_num', 'times'] as $property) { $movie[$property] = $movies[$property][$i]; } yield $movie; } } foreach (iterate_movies($movie_list) as $movie) { $title = $movie['type'] == 'tv_show' ? sprintf('%s-%d.%d', $movie['name'], $movie['season_num'], $movie['episode_num']) : $movie['name']; ?> <tr> <td><?= htmlspecialchars($title) ?></td> <td><?= htmlspecialchars($movie['times']) ?></td> </tr> <?php }

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.4.130.0090.01118.64
8.4.120.0110.00523.81
8.4.110.0110.00919.18
8.4.100.0050.00319.05
8.4.90.0120.00820.61
8.4.80.0100.00918.84
8.4.70.0080.00917.82
8.4.60.0150.00518.70
8.4.50.0120.00618.91
8.4.40.0030.01719.67
8.4.30.0170.00319.33
8.4.20.0040.01220.40
8.4.10.0090.00017.78
8.3.260.0130.00616.46
8.3.250.0060.01218.94
8.3.240.0090.01017.32
8.3.230.0110.00616.79
8.3.220.0040.00518.92
8.3.210.0040.00416.64
8.3.200.0030.00616.45
8.3.190.0130.00917.42
8.3.180.0040.00519.00
8.3.170.0170.00018.67
8.3.160.0150.00416.46
8.3.150.0170.00317.14
8.3.140.0060.00318.21
8.3.130.0090.00018.43
8.3.120.0040.00818.90
8.3.110.0050.00320.94
8.3.100.0060.00324.06
8.3.90.0000.00826.77
8.3.80.0090.00017.97
8.3.70.0120.00318.43
8.3.60.0090.01218.52
8.3.50.0040.01018.32
8.3.40.0180.00418.77
8.3.30.0090.00618.81
8.3.20.0080.00018.79
8.3.10.0090.00623.48
8.3.00.0000.00822.52
8.2.290.0110.00920.40
8.2.280.0050.00418.62
8.2.270.0030.00717.34
8.2.260.0060.00918.82
8.2.250.0090.00016.59
8.2.240.0110.01117.26
8.2.230.0050.00322.58
8.2.220.0100.00037.54
8.2.210.0110.01126.77
8.2.200.0000.00816.63
8.2.190.0100.00716.91
8.2.180.0100.01016.88
8.2.170.0070.00722.96
8.2.160.0040.01120.25
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0040.00418.21
8.2.120.0040.00426.35
8.2.110.0060.00320.96
8.2.100.0070.00418.22
8.2.90.0030.00517.75
8.2.80.0090.00017.97
8.2.70.0060.00318.03
8.2.60.0040.00418.16
8.2.50.0040.00418.10
8.2.40.0040.00419.29
8.2.30.0040.00419.23
8.2.20.0040.00718.21
8.2.10.0040.00419.49
8.2.00.0000.00817.75
8.1.330.0140.00522.06
8.1.320.0140.00517.82
8.1.310.0110.00718.18
8.1.300.0040.01118.42
8.1.290.0040.00730.84
8.1.280.0120.00325.92
8.1.270.0030.00518.86
8.1.260.0040.00426.35
8.1.250.0000.00728.09
8.1.240.0060.00617.48
8.1.230.0110.00017.83
8.1.220.0000.00817.74
8.1.210.0030.00618.77
8.1.200.0060.00317.35
8.1.190.0040.00417.35
8.1.180.0000.00818.10
8.1.170.0040.00418.51
8.1.160.0040.00418.93
8.1.150.0080.00018.93
8.1.140.0040.00422.24
8.1.130.0070.00020.18
8.1.120.0000.00717.55
8.1.110.0050.00217.39
8.1.100.0030.00617.38
8.1.90.0000.00817.50
8.1.80.0030.00617.42
8.1.70.0070.00017.48
8.1.60.0000.00817.69
8.1.50.0060.00317.50
8.1.40.0040.00417.52
8.1.30.0030.00617.52
8.1.20.0050.00317.67
8.1.10.0080.00017.61
8.1.00.0000.00717.57
8.0.300.0040.00418.77
8.0.290.0040.00716.75
8.0.280.0060.00318.48
8.0.270.0080.00017.21
8.0.260.0060.00020.29
8.0.250.0000.00717.04
8.0.240.0070.00017.09
8.0.230.0000.00716.96
8.0.220.0000.00716.96
8.0.210.0070.00017.04
8.0.200.0030.00317.06
8.0.190.0080.00017.09
8.0.180.0040.00417.08
8.0.170.0040.00417.00
8.0.160.0080.00017.01
8.0.150.0000.00716.82
8.0.140.0040.00416.90
8.0.130.0050.00013.43
8.0.120.0040.00416.96
8.0.110.0080.00017.06
8.0.100.0000.00717.00
8.0.90.0000.00716.83
8.0.80.0100.00717.00
8.0.70.0050.00216.95
8.0.60.0040.00416.96
8.0.50.0000.00716.81
8.0.30.0080.01017.18
8.0.20.0090.01017.40
8.0.10.0020.00516.98
8.0.00.0120.00817.04
7.4.330.0000.00515.55
7.4.320.0060.00016.58
7.4.300.0000.00716.56
7.4.290.0050.00316.46
7.4.280.0050.00216.61
7.4.270.0030.00316.54
7.4.260.0030.00316.71
7.4.250.0000.00816.59
7.4.240.0000.00816.45
7.4.230.0030.00316.74
7.4.220.0000.00816.66
7.4.210.0090.00716.61
7.4.200.0000.00716.48
7.4.160.0100.00816.50
7.4.140.0100.00917.86
7.4.130.0110.00716.61
7.4.120.0110.00916.57
7.4.110.0140.00716.43
7.4.100.0060.01216.60
7.4.90.0130.00916.49
7.4.80.0130.00319.39
7.4.70.0060.01216.62
7.4.60.0060.00916.68
7.4.50.0110.00816.61
7.4.40.0090.01316.60
7.4.00.0030.01015.13
7.3.330.0050.00313.30
7.3.320.0030.00313.43
7.3.310.0030.00316.51
7.3.300.0030.00316.43
7.3.290.0030.00316.49
7.3.280.0070.00716.48
7.3.260.0130.00816.58
7.3.240.0100.00816.45
7.3.230.0150.00616.63
7.3.210.0120.00316.56
7.3.200.0140.00316.63
7.3.190.0080.00816.61
7.3.180.0030.01416.57
7.3.170.0100.00516.54
7.3.160.0080.01116.76
7.2.330.0070.01016.87
7.2.320.0100.01016.86
7.2.310.0120.00416.57
7.2.300.0040.01216.87
7.2.290.0160.00816.57
7.2.110.3120.00314.67
7.2.100.0250.00714.65
7.2.90.0660.00714.60
7.2.80.0180.00414.54
7.2.70.0130.00615.24
7.2.60.0170.00715.07
7.2.50.0190.00515.05
7.2.40.1210.00614.64
7.2.30.0080.02114.89
7.2.20.2570.01215.06
7.2.10.0110.00414.88
7.2.00.0200.01214.97
7.1.230.2830.00013.38
7.1.220.2450.00613.61
7.1.210.0150.00813.74
7.1.200.0570.00313.62
7.1.190.0070.01214.06
7.1.180.0090.00913.75
7.1.170.0100.01013.94
7.1.160.0040.01113.70
7.1.150.0300.00613.77
7.1.140.3180.00013.61
7.1.130.0180.00013.75
7.1.120.0200.01213.64
7.1.110.0150.00713.93
7.1.100.1360.00713.70
7.1.90.1640.00713.91
7.1.80.0210.00613.91
7.1.70.4720.00013.61
7.1.60.0470.00031.63
7.1.50.0320.01731.73
7.1.40.0330.01431.85
7.1.30.0370.00331.60
7.1.20.0490.02031.58
7.1.10.0630.00613.64
7.1.00.0110.01113.43
5.6.380.0100.00414.23

preferences:
36.28 ms | 403 KiB | 5 Q