3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = <<<DATA [ { "name": "counting animals", "template": "counting", "data": "Images/5cats.jpg", "choices": [ 2, 5, 6, 8 ], "correctAnswer": 1 } ] DATA; $json_var = json_decode($data, true); foreach ($json_var as $value) { if ($value["name"] === "counting animals") { printf('<img src="' . $value["data"] . '" />'); printf("<form id=\"form1\">"); foreach ($value["choices"] as $val) { printf("<input name=\"image-pick\" value=$val type=\"radio\" id=\"one-$val\" >" ); printf("<label></label>"); } printf("</form>"); } }

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.5.00.0190.00520.19
8.4.150.0020.00014.05
8.4.140.0190.00817.48
8.4.130.0060.00217.63
8.4.120.0070.00320.52
8.4.110.0040.00422.44
8.4.100.0100.01017.88
8.4.90.0140.00418.96
8.4.80.0090.01117.86
8.4.70.0140.00317.77
8.4.60.0110.00918.82
8.4.50.0020.00719.71
8.4.40.0080.01119.66
8.4.30.0000.00819.32
8.4.20.0060.00320.51
8.4.10.0170.00317.75
8.3.280.0150.00518.41
8.3.270.0110.00816.53
8.3.260.0100.01016.45
8.3.250.0090.00918.86
8.3.240.0120.00816.71
8.3.230.0080.00816.66
8.3.220.0140.00517.05
8.3.210.0080.00816.73
8.3.200.0060.00316.49
8.3.190.0100.00818.64
8.3.180.0080.00718.24
8.3.170.0060.01218.86
8.3.160.0080.00016.62
8.3.150.0090.00917.07
8.3.140.0120.00616.59
8.3.130.0090.00618.43
8.3.120.0030.00618.80
8.3.110.0030.00520.94
8.3.100.0040.00424.06
8.3.90.0030.00626.77
8.3.80.0030.00617.97
8.3.70.0040.01116.75
8.3.60.0130.00718.27
8.3.50.0070.01118.32
8.3.40.0110.00418.96
8.3.30.0100.00718.90
8.3.20.0000.00718.89
8.3.10.0050.00321.77
8.3.00.0040.00418.96
8.2.290.0060.00920.37
8.2.280.0100.00818.21
8.2.270.0110.00717.19
8.2.260.0100.00718.94
8.2.250.0060.00316.76
8.2.240.0090.00017.30
8.2.230.0080.00022.58
8.2.220.0040.00437.54
8.2.210.0080.00026.77
8.2.200.0080.00016.50
8.2.190.0070.00718.32
8.2.180.0120.00918.17
8.2.170.0110.00422.96
8.2.160.0100.00320.41
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0080.00019.39
8.2.120.0040.00426.35
8.2.110.0050.00522.20
8.2.100.0080.00417.72
8.2.90.0030.00517.75
8.2.80.0030.00617.97
8.2.70.0000.01018.03
8.2.60.0030.00618.16
8.2.50.0080.00018.10
8.2.40.0040.00419.30
8.2.30.0040.00419.21
8.2.20.0000.00718.14
8.2.10.0000.00718.15
8.2.00.0000.00719.32
8.1.330.0100.00921.90
8.1.320.0090.00916.46
8.1.310.0100.00716.77
8.1.300.0070.01118.04
8.1.290.0040.00730.84
8.1.280.0060.01225.92
8.1.270.0030.01722.02
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0030.00622.61
8.1.230.0070.00420.85
8.1.220.0050.00317.75
8.1.210.0000.00818.77
8.1.200.0000.00917.25
8.1.190.0060.00317.13
8.1.180.0000.00818.10
8.1.170.0040.00418.68
8.1.160.0000.00818.96
8.1.150.0000.00918.92
8.1.140.0000.00722.11
8.1.130.0000.00720.09
8.1.120.0000.00717.50
8.1.110.0030.00617.38
8.1.100.0040.00417.38
8.1.90.0030.00617.41
8.1.80.0000.00817.44
8.1.70.0000.00817.39
8.1.60.0040.00417.63
8.1.50.0040.00417.55
8.1.40.0000.00717.55
8.1.30.0070.00417.64
8.1.20.0050.00217.74
8.1.10.0030.00617.65
8.1.00.0030.00617.42
8.0.300.0040.00418.77
8.0.290.0100.00016.86
8.0.280.0030.00318.53
8.0.270.0030.00317.29
8.0.260.0070.00018.53
8.0.250.0070.00016.95
8.0.240.0050.00316.96
8.0.230.0020.00516.96
8.0.220.0030.00517.01
8.0.210.0000.00717.00
8.0.200.0030.00317.03
8.0.190.0040.00417.02
8.0.180.0080.00016.89
8.0.170.0030.00616.99
8.0.160.0000.00716.96
8.0.150.0040.00316.89
8.0.140.0030.00316.90
8.0.130.0000.00513.39
8.0.120.0040.00416.90
8.0.110.0000.00716.98
8.0.100.0040.00416.88
8.0.90.0070.00016.80
8.0.80.0080.01316.99
8.0.70.0000.00717.04
8.0.60.0070.00016.84
8.0.50.0040.00417.04
8.0.30.0110.01117.11
8.0.20.0140.00917.40
8.0.10.0030.00516.94
8.0.00.0090.00916.71
7.4.330.0020.00215.55
7.4.320.0030.00316.60
7.4.300.0030.00316.50
7.4.290.0070.00016.57
7.4.280.0030.00416.53
7.4.270.0040.00416.44
7.4.260.0040.00416.52
7.4.250.0040.00416.49
7.4.240.0050.00216.58
7.4.230.0040.00416.63
7.4.220.0080.00016.73
7.4.210.0140.00416.66
7.4.200.0000.00716.44
7.4.160.0100.00916.56
7.4.140.0120.00817.86
7.4.130.0140.01216.70
7.4.120.0090.01016.55
7.4.110.0110.00716.44
7.4.100.0090.00616.55
7.4.90.0110.00616.66
7.4.80.0090.00919.39
7.4.70.0110.01116.70
7.4.60.0120.00416.46
7.4.50.0110.00716.63
7.4.40.0100.00516.76
7.4.00.0110.00514.97
7.3.330.0000.00613.16
7.3.320.0000.00513.30
7.3.310.0040.00416.34
7.3.300.0030.00316.32
7.3.290.0070.00016.41
7.3.280.0040.01416.37
7.3.260.0110.00816.50
7.3.240.0130.00516.53
7.3.230.0090.00916.53
7.3.210.0100.00616.43
7.3.200.0130.00716.43
7.3.190.0130.01016.68
7.3.180.0100.01016.49
7.3.170.0190.01616.49
7.3.160.0030.01316.48
7.3.120.0070.01014.94
7.3.110.0120.00614.80
7.3.100.0060.00914.73
7.3.90.0070.00714.71
7.3.80.0030.00614.73
7.3.70.0030.00814.66
7.3.60.0090.00614.92
7.3.50.0070.00715.01
7.3.40.0140.00014.98
7.3.30.0070.01014.96
7.3.20.0070.00716.56
7.3.10.0110.00716.91
7.3.00.0070.00716.46
7.2.330.0060.01316.89
7.2.320.0140.00416.48
7.2.310.0070.01016.69
7.2.300.0160.00016.36
7.2.290.0140.00716.43
7.2.250.0100.01015.00
7.2.240.0070.01414.99
7.2.230.0090.00614.84
7.2.220.0120.00415.25
7.2.210.0090.00614.90
7.2.200.0100.00315.34
7.2.190.0090.00615.11
7.2.180.0110.00314.92
7.2.170.0030.00615.20
7.2.120.0620.01114.83
7.2.110.0890.00714.82
7.2.100.1310.01014.92
7.2.90.1230.01314.88
7.2.80.1250.01014.92
7.2.70.1320.00715.14
7.2.60.1240.01015.15
7.2.50.0310.00314.97
7.2.40.2150.00715.31
7.2.30.0210.01015.23
7.2.20.0090.00915.39
7.2.10.0300.00014.81
7.2.00.0060.01214.98
7.1.330.0030.01215.80
7.1.320.0090.00315.61
7.1.310.0150.00315.70
7.1.300.0060.00915.92
7.1.290.0030.01215.49
7.1.280.0040.00415.76
7.1.270.0030.01015.67
7.1.260.0070.00715.75
7.1.240.1740.00313.84
7.1.230.1010.00314.12
7.1.220.0800.00714.09
7.1.210.1270.01314.12
7.1.200.0760.01014.01
7.1.190.1310.00314.11
7.1.180.1460.00313.64
7.1.170.0370.00613.95
7.1.160.0100.00813.94
7.1.150.0150.00213.82
7.1.140.0130.00413.73
7.1.130.0120.00513.73
7.1.120.0110.01113.73
7.1.110.0160.00813.88
7.1.100.0220.00614.13
7.1.90.0090.00914.02
7.1.80.0860.00713.94
7.1.70.0330.01014.13
7.1.60.0170.00314.02
7.1.50.0130.00613.94
7.1.40.0080.01313.99
7.1.30.0390.00313.99
7.1.20.1280.00913.90
7.1.10.0000.01913.96
7.1.00.0080.00613.97
5.6.380.0090.00614.43

preferences:
38.38 ms | 403 KiB | 5 Q