3v4l.org

run code in 300+ PHP versions simultaneously
<?php $currencies = [ 'mxn' => [ 'sign' => '$', 'plans' => [ 'tiny' => 429, 'small' => 1319, 'medium' => 3399, 'big' => 6669 ] ], 'usd' => [ 'sign' => '$', 'plans' => [ 'tiny' => 29, 'small' => 319, 'medium' => 399, 'big' => 669 ] ] ]; $currency='mxn'; if(!isset($currencies[$currency])){ echo "$currency was not found in the currencies array."; }else{ echo "In $currency:\n"; foreach($currencies[$currency]['plans'] as $size=>$price){ echo "\t$size costs {$currencies[$currency]['sign']}$price\n"; } }

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.30.0110.00620.77
8.5.20.0100.00821.27
8.5.10.0030.00616.74
8.5.00.0140.00719.85
8.4.180.0110.01119.50
8.4.170.0120.00920.44
8.4.160.0100.01122.15
8.4.150.0080.00516.88
8.4.140.0150.00717.62
8.4.130.0140.00617.46
8.4.120.0100.00823.89
8.4.110.0140.00622.64
8.4.100.0030.00517.77
8.4.90.0120.00917.71
8.4.80.0110.00517.91
8.4.70.0120.00717.91
8.4.60.0090.01118.76
8.4.50.0100.00919.19
8.4.40.0140.00717.82
8.4.30.0000.00817.70
8.4.20.0120.00819.25
8.4.10.0100.01019.48
8.3.300.0100.01020.59
8.3.290.0110.00920.82
8.3.280.0070.01318.35
8.3.270.0130.00716.68
8.3.260.0110.00817.30
8.3.250.0030.00519.10
8.3.240.0120.00917.16
8.3.230.0040.00416.74
8.3.220.0130.00619.01
8.3.210.0080.00816.53
8.3.200.0020.00716.72
8.3.190.0040.00417.09
8.3.180.0070.00216.79
8.3.170.0140.00416.53
8.3.160.0000.01816.95
8.3.150.0040.01118.90
8.3.140.0030.00618.96
8.3.130.0000.00818.37
8.3.120.0050.00520.89
8.3.110.0060.01316.65
8.3.100.0080.00016.54
8.3.90.0120.00626.77
8.3.80.0050.00516.75
8.3.70.0120.00616.63
8.3.60.0040.01118.55
8.3.50.0140.01016.49
8.3.40.0030.01318.83
8.3.30.0140.00718.67
8.3.20.0030.00518.73
8.3.10.0040.00423.61
8.3.00.0040.00719.38
8.2.300.0060.00324.09
8.2.290.0110.00820.31
8.2.280.0060.00418.64
8.2.270.0160.00316.79
8.2.260.0030.00516.75
8.2.250.0050.00318.48
8.2.240.0090.00017.29
8.2.230.0030.00620.94
8.2.220.0060.00324.06
8.2.210.0050.00326.77
8.2.200.0070.00316.50
8.2.190.0110.00416.63
8.2.180.0040.01925.92
8.2.170.0000.01518.88
8.2.160.0070.01119.02
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0080.00019.27
8.2.120.0000.00826.35
8.2.110.0070.00319.14
8.2.100.0070.00417.78
8.2.90.0060.00318.19
8.2.80.0080.00018.03
8.2.70.0050.00317.93
8.2.60.0040.00418.16
8.2.50.0040.00418.10
8.2.40.0070.00020.45
8.2.30.0050.00219.25
8.2.20.0030.00518.08
8.2.10.0000.00818.23
8.2.00.0000.00718.23
8.1.340.0100.01017.43
8.1.330.0110.00818.45
8.1.320.0120.00716.08
8.1.310.0030.00616.83
8.1.300.0090.00016.23
8.1.290.0090.00030.84
8.1.280.0030.01325.92
8.1.270.0060.00323.89
8.1.260.0000.00726.35
8.1.250.0070.00028.09
8.1.240.0040.00819.23
8.1.230.0080.00321.04
8.1.220.0030.00517.78
8.1.210.0040.00420.99
8.1.200.0060.00317.23
8.1.190.0080.00017.10
8.1.180.0080.00018.82
8.1.170.0030.00518.36
8.1.160.0040.00418.74
8.1.150.0080.00018.89
8.1.140.0040.00419.09
8.1.130.0070.00019.02
8.1.120.0060.00317.36
8.1.110.0040.00417.33
8.1.100.0040.00417.46
8.1.90.0080.00017.49
8.1.80.0090.00017.48
8.1.70.0000.00717.46
8.1.60.0040.00417.56
8.1.50.0000.00817.42
8.1.40.0040.00417.50
8.1.30.0050.00317.60
8.1.20.0030.00917.66
8.1.10.0080.00017.59
8.1.00.0060.00317.51
8.0.300.0040.00419.76
8.0.290.0060.00316.75
8.0.280.0070.00018.45
8.0.270.0030.00317.26
8.0.260.0030.00517.26
8.0.250.0030.00316.96
8.0.240.0050.00316.89
8.0.230.0070.00017.00
8.0.220.0060.00316.91
8.0.210.0060.00016.78
8.0.200.0000.00716.97
8.0.190.0030.00516.91
8.0.180.0040.00416.88
8.0.170.0050.00316.80
8.0.160.0050.00316.91
8.0.150.0000.00716.87
8.0.140.0030.00316.77
8.0.130.0030.00313.40
8.0.120.0040.00416.78
8.0.110.0040.00416.92
8.0.100.0040.00416.84
8.0.90.0080.00016.91
8.0.80.0040.01116.95
8.0.70.0000.00816.86
8.0.60.0030.00417.01
8.0.50.0000.00816.69
8.0.30.0100.00917.09
8.0.20.0120.00917.40
8.0.10.0030.00317.13
8.0.00.0100.00916.80
7.4.330.0030.00316.64
7.4.320.0000.00616.48
7.4.300.0000.00616.57
7.4.290.0070.00316.63
7.4.280.0000.00916.50
7.4.270.0040.00416.60
7.4.260.0000.00716.41
7.4.250.0050.00316.56
7.4.240.0070.00016.49
7.4.230.0030.00316.53
7.4.220.0040.00416.41
7.4.210.0150.00016.56
7.4.200.0030.00316.63
7.4.160.0060.00916.59
7.4.150.0040.01317.40
7.4.140.0080.01317.86
7.4.130.0110.00816.34
7.4.120.0130.01016.55
7.4.110.0150.00716.49
7.4.100.0120.01216.58
7.4.90.0060.01116.48
7.4.80.0000.02019.39
7.4.70.0150.00716.61
7.4.60.0170.00016.43
7.4.50.0070.01116.41
7.4.40.0090.01216.60
7.4.00.0030.01314.98
7.3.330.0030.00313.17
7.3.320.0060.00013.02
7.3.310.0040.00416.16
7.3.300.0070.00016.35
7.3.290.0090.00816.29
7.3.280.0090.00616.33
7.3.270.0070.01117.40
7.3.260.0130.00616.52
7.3.250.0120.00716.42
7.3.240.0080.01216.43
7.3.230.0140.00316.53
7.3.210.0110.00616.34
7.3.200.0060.01016.71
7.3.190.0120.00316.26
7.3.180.0060.01016.46
7.3.170.0140.00716.67
7.3.160.0130.00416.34
7.2.330.0140.00316.45
7.2.320.0120.00616.56
7.2.310.0150.00316.42
7.2.300.0110.01216.51
7.2.290.0070.01016.66
7.2.60.0070.00716.81
7.2.10.0110.02117.80
7.2.00.0260.00417.73
7.1.200.0040.00815.62
7.1.130.0690.01316.71
7.1.120.0240.00916.66
7.1.110.0260.00316.34
7.1.100.0220.00316.01
7.1.90.0390.00416.33
7.1.80.0180.00916.11
7.1.70.0220.01015.19
7.1.60.0360.00433.10
7.1.50.0360.00733.05
7.1.40.0310.01132.52
7.1.30.0350.01032.42
7.1.20.0260.01332.66
7.1.10.0180.00714.43
7.1.00.0150.01115.01

preferences:
114.24 ms | 1391 KiB | 5 Q