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('@test5a@testb5', ['@test5a' => '', '@test5b' => '']); 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.0100.01016.63
8.3.50.0100.00716.35
8.3.40.0000.01418.84
8.3.30.0090.00618.63
8.3.20.0040.00420.12
8.3.10.0030.00621.86
8.3.00.0040.00419.67
8.2.180.0110.00717.91
8.2.170.0170.00322.96
8.2.160.0130.00720.38
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0070.00026.16
8.2.120.0040.00419.64
8.2.110.0030.00620.93
8.2.100.0080.00417.72
8.2.90.0050.00219.09
8.2.80.0040.00417.97
8.2.70.0000.00817.63
8.2.60.0060.00317.55
8.2.50.0040.00418.07
8.2.40.0060.00321.25
8.2.30.0030.00619.71
8.2.20.0040.00417.69
8.2.10.0070.00017.91
8.2.00.0030.00318.11
8.1.280.0070.01425.92
8.1.270.0080.00020.00
8.1.260.0070.00026.35
8.1.250.0070.00028.09
8.1.240.0060.00620.32
8.1.230.0110.00022.64
8.1.220.0080.00017.74
8.1.210.0000.00818.77
8.1.200.0080.00017.11
8.1.190.0080.00017.10
8.1.180.0030.00618.10
8.1.170.0040.00418.46
8.1.160.0050.00321.99
8.1.150.0030.00618.77
8.1.140.0040.00417.33
8.1.130.0000.00717.50
8.1.120.0070.00017.27
8.1.110.0060.00317.38
8.1.100.0040.00417.22
8.1.90.0070.00017.21
8.1.80.0030.00617.21
8.1.70.0030.00317.21
8.1.60.0000.00917.45
8.1.50.0030.00517.34
8.1.40.0050.00317.45
8.1.30.0030.00517.58
8.1.20.0040.00417.61
8.1.10.0040.00417.52
8.1.00.0030.00617.40
8.0.300.0040.00419.65
8.0.290.0070.00016.75
8.0.280.0070.00018.38
8.0.270.0030.00417.15
8.0.260.0000.00617.07
8.0.250.0040.00416.96
8.0.240.0060.00516.86
8.0.230.0030.00316.87
8.0.220.0060.00016.82
8.0.210.0100.00016.84
8.0.200.0060.00016.93
8.0.190.0090.00016.91
8.0.180.0040.00716.75
8.0.170.0030.00616.85
8.0.160.0000.00716.84
8.0.150.0000.00816.80
8.0.140.0050.00316.76
8.0.130.0060.00013.29
8.0.120.0000.00816.84
8.0.110.0050.00316.81
8.0.100.0000.00816.73
8.0.90.0030.00416.61
8.0.80.0120.00416.76
8.0.70.0000.00816.62
8.0.60.0050.00316.64
8.0.50.0040.00316.77
8.0.30.0080.00817.13
8.0.20.0100.00817.40
8.0.10.0040.00416.83
8.0.00.0100.00916.50
7.4.330.0000.00515.08
7.4.320.0030.00316.47
7.4.300.0030.00316.55
7.4.290.0030.00316.49
7.4.280.0040.00716.43
7.4.270.0000.00716.53
7.4.260.0000.00716.45
7.4.250.0080.00016.52
7.4.240.0030.00516.50
7.4.230.0000.00716.63
7.4.220.0120.00616.55
7.4.210.0140.00716.49
7.4.200.0030.00516.46
7.4.160.0130.00416.45
7.4.150.0140.00417.40
7.4.140.0120.00917.86
7.4.130.0120.01116.58
7.4.120.0080.01116.34
7.4.110.0120.00816.50
7.4.100.0110.01116.43
7.4.90.0110.00716.41
7.4.80.0070.01119.39
7.4.70.0140.00316.23
7.4.60.0000.01516.38
7.4.50.0000.00816.54
7.4.40.0120.00616.32
7.4.30.0030.01516.51
7.4.00.0040.01115.16
7.3.330.0040.00413.45
7.3.320.0030.00313.26
7.3.310.0040.00416.45
7.3.300.0000.00716.41
7.3.290.0060.01016.41
7.3.280.0090.01016.40
7.3.270.0130.00417.40
7.3.260.0060.01216.56
7.3.250.0060.01116.49
7.3.240.0100.00716.59
7.3.230.0030.01616.48
7.3.210.0030.01316.43
7.3.200.0090.01416.40
7.3.190.0080.00816.46
7.3.180.0110.00816.46
7.3.170.0060.01016.65
7.3.160.0110.01116.55
7.2.330.0130.00516.81
7.2.320.0030.02316.80
7.2.310.0080.00816.46
7.2.300.0000.01816.49
7.2.290.0070.01716.54
7.2.60.0030.01216.78
7.2.00.0030.01219.43
7.1.200.0070.00415.83
7.1.100.0090.00617.73
7.1.70.0050.00317.30
7.1.60.0100.01320.03
7.1.50.0070.01717.05
7.1.00.0070.07322.30
7.0.200.0030.00816.52
7.0.100.0070.07720.05
7.0.90.0170.07319.91
7.0.80.0070.08019.89
7.0.70.0100.08319.97
7.0.60.0070.07319.80
7.0.50.0070.08320.22
7.0.40.0070.07020.05
7.0.30.0070.08720.00
7.0.20.0170.07320.19
7.0.10.0030.08720.04
7.0.00.0100.08020.17
5.6.280.0070.05021.03
5.6.250.0170.07020.79
5.6.240.0100.04020.68
5.6.230.0170.07320.67
5.6.220.0130.06020.75
5.6.210.0100.07320.76
5.6.200.0130.04321.14
5.6.190.0000.08020.99
5.6.180.0100.07021.00
5.6.170.0100.08021.08
5.6.160.0070.08721.01
5.6.150.0030.08721.16
5.6.140.0070.08721.09
5.6.130.0070.07721.01
5.6.120.0070.08021.08
5.6.110.0130.07321.00
5.6.100.0100.04721.04
5.6.90.0000.06721.09
5.6.80.0070.07320.57
5.6.70.0170.07720.55
5.6.60.0100.05720.43
5.6.50.0130.03720.40
5.6.40.0070.07020.43
5.6.30.0000.05720.47
5.6.20.0030.04720.44
5.6.10.0070.08020.46
5.6.00.0170.07020.47
5.5.380.0200.06320.46
5.5.370.0200.07020.56
5.5.360.0030.08720.42
5.5.350.0030.05320.48
5.5.340.0070.07720.99
5.5.330.0100.08720.92
5.5.320.0130.08020.82
5.5.310.0070.08020.97
5.5.300.0170.06320.96
5.5.290.0100.07320.85
5.5.280.0070.08020.93
5.5.270.0070.07320.97
5.5.260.0070.07720.91
5.5.250.0070.08720.74
5.5.240.0130.07320.35
5.5.230.0100.08020.31
5.5.220.0170.07020.30
5.5.210.0100.05020.07
5.5.200.0170.07020.18
5.5.190.0100.06720.19
5.5.180.0100.07320.20
5.5.160.0200.07020.18
5.5.150.0170.07020.26
5.5.140.0070.08320.24
5.5.130.0030.06020.21
5.5.120.0170.07020.04
5.5.110.0030.08320.23
5.5.100.0170.04720.13
5.5.90.0130.04020.16
5.5.80.0130.07020.21
5.5.70.0100.04720.11
5.5.60.0070.07020.00
5.5.50.0100.07320.10
5.5.40.0130.06720.20
5.5.30.0100.08020.01
5.5.20.0170.06020.11
5.5.10.0030.07020.06
5.5.00.0070.07720.11
5.4.450.0130.05019.27
5.4.440.0170.07019.53
5.4.430.0070.04719.55
5.4.420.0000.08319.33
5.4.410.0070.08019.31
5.4.400.0130.07319.21
5.4.390.0200.06319.11
5.4.380.0030.07719.11
5.4.370.0130.03019.20
5.4.360.0070.07719.16
5.4.350.0030.07319.11
5.4.340.0070.07719.25
5.4.320.0030.07719.00
5.4.310.0070.04319.11
5.4.300.0070.07719.02
5.4.290.0030.05718.94
5.4.280.0070.07319.11
5.4.270.0200.06718.98
5.4.260.0030.07018.91
5.4.250.0130.07319.22
5.4.240.0230.03719.24
5.4.230.0100.06018.96
5.4.220.0100.07319.18
5.4.210.0130.06719.08
5.4.200.0100.07018.93
5.4.190.0070.07019.15
5.4.180.0100.07319.10
5.4.170.0030.05718.96
5.4.160.0070.07319.13
5.4.150.0100.07319.19
5.4.140.0070.05716.43
5.4.130.0100.07016.41
5.4.120.0000.05316.45
5.4.110.0030.04316.52
5.4.100.0070.08316.46
5.4.90.0170.06716.41
5.4.80.0130.06316.38
5.4.70.0030.07316.48
5.4.60.0170.06016.41
5.4.50.0100.06716.52
5.4.40.0070.07316.36
5.4.30.0030.06316.32
5.4.20.0070.06316.49
5.4.10.0070.07316.36
5.4.00.0130.05315.88

preferences:
55.79 ms | 400 KiB | 5 Q