3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test_assert($string, $arguments = array()) { // Make sure we don't pass in an empty string. assert('$string !== \'\' && (empty($arguments) || strtr($string, $arguments) !== \'\')', 'empty fail:' . $string); // Make sure we don't translate unnecessarily. assert('empty($arguments) || strtr($string, $arguments) != implode($arguments)', 'unnecesary fail: ' . $string); } test_assert('@test1', ['@test1' => 'test']); test_assert('@test2', ['@test2' => 'test']); test_assert('@test3 foo', ['@test3' => 'test3', '@test_not_used' => 'test']); test_assert('@test4 foo', ['@test4' => 'test4']); test_assert('');

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.3.60.0150.00616.63
8.3.50.0040.01521.14
8.3.40.0070.00718.57
8.3.30.0070.00718.50
8.3.20.0030.00620.33
8.3.10.0040.00421.91
8.3.00.0040.00419.69
8.2.180.0030.01716.75
8.2.170.0110.00318.97
8.2.160.0110.00422.96
8.2.150.0050.00225.66
8.2.140.0110.00424.66
8.2.130.0030.00526.16
8.2.120.0050.00317.63
8.2.110.0070.00420.47
8.2.100.0000.01017.66
8.2.90.0080.00017.78
8.2.80.0060.00317.97
8.2.70.0050.00317.50
8.2.60.0030.00617.80
8.2.50.0000.00818.07
8.2.40.0050.00318.04
8.2.30.0000.00718.00
8.2.20.0000.00717.69
8.2.10.0040.00417.88
8.2.00.0070.00018.09
8.1.280.0080.00825.92
8.1.270.0000.00820.39
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0040.00420.52
8.1.230.0110.00022.75
8.1.220.0050.00317.74
8.1.210.0060.00318.84
8.1.200.0030.00617.23
8.1.190.0050.00317.23
8.1.180.0060.00318.10
8.1.170.0040.00418.97
8.1.160.0040.00418.84
8.1.150.0060.00318.68
8.1.140.0040.00417.33
8.1.130.0030.00317.24
8.1.120.0000.00817.25
8.1.110.0030.00717.34
8.1.100.0040.00417.40
8.1.90.0000.00717.26
8.1.80.0030.00617.27
8.1.70.0030.00317.23
8.1.60.0040.00417.56
8.1.50.0030.00617.36
8.1.40.0030.00517.43
8.1.30.0040.00417.64
8.1.20.0000.00717.52
8.1.10.0040.00417.45
8.1.00.0030.00517.32
8.0.300.0000.00719.91
8.0.290.0080.00016.63
8.0.280.0030.00318.45
8.0.270.0070.00017.20
8.0.260.0030.00316.69
8.0.250.0000.00816.96
8.0.240.0070.00416.77
8.0.230.0000.00716.71
8.0.220.0030.00316.77
8.0.210.0070.00316.73
8.0.200.0030.00316.95
8.0.190.0040.00416.90
8.0.180.0060.00316.89
8.0.170.0060.00316.86
8.0.160.0030.00316.83
8.0.150.0030.00316.77
8.0.140.0040.00416.68
8.0.130.0050.00013.26
8.0.120.0000.00816.69
8.0.110.0040.00416.73
8.0.100.0000.00816.78
8.0.90.0070.00016.81
8.0.80.0060.01516.82
8.0.70.0030.00516.82
8.0.60.0000.00716.64
8.0.50.0030.00516.89
8.0.30.0070.00916.87
8.0.20.0110.00817.40
8.0.10.0040.00416.70
8.0.00.0100.00716.67
7.4.330.0060.00015.08
7.4.320.0060.00016.60
7.4.300.0000.00716.44
7.4.290.0000.00716.61
7.4.280.0060.00616.56
7.4.270.0000.00716.58
7.4.260.0050.00216.50
7.4.250.0030.00516.51
7.4.240.0030.00316.56
7.4.230.0000.00716.36
7.4.220.0100.01016.67
7.4.210.0000.02116.57
7.4.200.0080.00016.26
7.4.160.0160.00616.42
7.4.150.0100.01017.40
7.4.140.0100.01017.86
7.4.130.0060.01316.43
7.4.120.0030.01416.55
7.4.110.0110.00716.40
7.4.100.0140.00616.29
7.4.90.0070.01116.39
7.4.80.0120.00919.39
7.4.70.0120.00416.25
7.4.60.0040.01216.49
7.4.50.0000.00816.41
7.4.40.0110.00616.27
7.4.30.0120.00916.56
7.4.00.0080.00715.05
7.3.330.0070.00013.41
7.3.320.0000.00613.29
7.3.310.0050.00316.30
7.3.300.0000.00616.48
7.3.290.0090.00616.40
7.3.280.0070.01216.45
7.3.270.0090.00917.40
7.3.260.0120.00916.65
7.3.250.0090.01016.48
7.3.240.0060.01216.61
7.3.230.0070.01716.39
7.3.210.0110.00516.40
7.3.200.0120.00316.56
7.3.190.0110.00516.48
7.3.180.0160.00016.36
7.3.170.0080.00816.49
7.3.160.0110.00716.62
7.3.120.0070.01114.92
7.3.110.0060.01214.78
7.3.100.0000.01915.09
7.3.90.0130.00614.73
7.3.80.0060.00614.73
7.3.70.0090.00414.68
7.3.60.0030.00614.83
7.3.50.0100.00314.80
7.3.40.0100.00614.84
7.3.30.0030.01014.79
7.3.20.0060.00916.42
7.3.10.0080.00616.74
7.3.00.0080.00416.87
7.2.330.0140.00316.77
7.2.320.0150.00316.56
7.2.310.0030.01416.77
7.2.300.0150.00816.53
7.2.290.0070.01816.59
7.2.250.0070.01015.09
7.2.240.0070.01315.05
7.2.230.0030.01714.91
7.2.220.0100.01015.03
7.2.210.0040.01114.95
7.2.200.0060.00914.75
7.2.190.0030.01015.20
7.2.180.0140.00715.21
7.2.170.0090.00614.96
7.2.130.0070.00416.86
7.2.120.0000.00916.95
7.2.110.0000.01316.98
7.2.100.0100.00317.04
7.2.90.0080.00416.95
7.2.80.0060.00316.91
7.2.70.0000.01316.64
7.2.60.0060.00816.88
7.2.50.0100.00316.73
7.2.40.0030.01417.08
7.2.30.0070.00316.64
7.2.20.0130.00316.94
7.2.10.0030.01017.07
7.2.00.0020.01418.19
7.1.330.0090.00615.55
7.1.320.0120.00615.75
7.1.310.0110.00415.80
7.1.300.0050.00815.78
7.1.290.0090.00615.60
7.1.280.0070.01115.88
7.1.270.0000.01315.84
7.1.260.0060.01015.86
7.1.250.0000.00815.75
7.1.200.0070.00415.64
7.1.100.0120.00018.18
7.1.70.0080.00017.09
7.1.60.0000.02520.03
7.1.50.0110.01116.78
7.1.00.0000.08022.51
7.0.200.0040.00816.78
7.0.60.0030.04319.91
7.0.50.0030.07717.91
7.0.40.0030.04720.11
7.0.30.0230.07720.26
7.0.20.0200.04720.09
7.0.10.0330.08020.24
7.0.00.0070.08020.23
5.6.280.0000.05720.94
5.6.210.0030.07720.52
5.6.200.0100.04718.19
5.6.190.0030.04320.64
5.6.180.0000.06020.69
5.6.170.0200.05720.51
5.6.160.0130.05720.51
5.6.150.0070.08718.19
5.6.140.0200.05018.21
5.6.130.0200.06718.25
5.6.120.0070.08021.08
5.6.110.0130.06321.04
5.6.100.0130.06721.00
5.6.90.0070.04321.08
5.6.80.0070.06720.45
5.6.70.0170.03020.43
5.5.350.0100.06720.43
5.5.340.0030.09318.16
5.5.330.0070.08320.63
5.5.320.0070.06320.37
5.5.310.0400.07720.30
5.5.300.0070.03718.02
5.5.290.0070.08318.02
5.5.280.0000.04720.83
5.5.270.0070.07020.82
5.5.260.0070.04320.81
5.5.250.0070.08020.67
5.5.240.0100.07720.29
5.4.450.0500.05719.54
5.4.440.0500.06019.77
5.4.430.0630.06719.65
5.4.420.0370.07019.69
5.4.410.0500.04719.10
5.4.400.0430.04719.23
5.4.390.0500.05319.41
5.4.380.0500.05019.21
5.4.370.0370.05719.07
5.4.360.0430.05019.37
5.4.350.0430.05019.21
5.4.340.0330.06019.36
5.4.320.0500.04719.21
5.4.310.0370.06019.30
5.4.300.0400.05319.35
5.4.290.0330.06319.37
5.4.280.0270.06319.14
5.4.270.0430.05718.91
5.4.260.0470.06019.28
5.4.250.0530.06719.21
5.4.240.0630.07718.90
5.4.230.0570.06019.30
5.4.220.0500.05719.04
5.4.210.0570.05019.05
5.4.200.0400.05316.84
5.4.190.0500.04719.07
5.4.180.0600.03719.16
5.4.170.0570.06719.21
5.4.160.0470.05018.91
5.4.150.0800.06019.38
5.4.140.0400.07016.43
5.4.130.0500.05016.49
5.4.120.0470.05316.36
5.4.110.0600.04316.48
5.4.100.0430.06316.31
5.4.90.0630.05716.31
5.4.80.0570.05316.48
5.4.70.0530.05716.41
5.4.60.0500.05716.50
5.4.50.0570.04316.52
5.4.40.0570.04716.51
5.4.30.0430.06016.28
5.4.20.0800.05316.37
5.4.10.0430.04716.27
5.4.00.0600.03315.73

preferences:
37.44 ms | 401 KiB | 5 Q