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', ['@test1' => 'test']); test_assert('@test3 foo', ['@test3' => 'test3', '@test_not_used' => 'test']); test_assert('@test3 foo', ['@test3' => 'test3', '@test_not_used' => 'test']);

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.0000.01516.75
8.3.50.0110.00716.30
8.3.40.0120.00318.68
8.3.30.0070.00718.76
8.3.20.0070.00020.34
8.3.10.0080.00021.78
8.3.00.0080.00019.69
8.2.180.0110.00316.32
8.2.170.0120.00922.96
8.2.160.0090.00620.39
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0000.00826.16
8.2.120.0040.00417.63
8.2.110.0040.00420.57
8.2.100.0080.00417.50
8.2.90.0040.00419.22
8.2.80.0050.00317.97
8.2.70.0040.00417.38
8.2.60.0050.00317.93
8.2.50.0000.00818.07
8.2.40.0040.00420.96
8.2.30.0090.00019.79
8.2.20.0030.00517.53
8.2.10.0000.00717.88
8.2.00.0040.00417.90
8.1.280.0110.00425.92
8.1.270.0120.00620.25
8.1.260.0070.00026.35
8.1.250.0070.00028.09
8.1.240.0090.00019.36
8.1.230.0040.00720.84
8.1.220.0080.00017.74
8.1.210.0060.00318.77
8.1.200.0030.00617.23
8.1.190.0030.00517.10
8.1.180.0000.00818.10
8.1.170.0080.00018.49
8.1.160.0030.00521.86
8.1.150.0000.00718.61
8.1.140.0000.00817.32
8.1.130.0030.00317.54
8.1.120.0000.00717.38
8.1.110.0060.00317.26
8.1.100.0030.00417.21
8.1.90.0000.00717.32
8.1.80.0050.00317.31
8.1.70.0040.00417.30
8.1.60.0080.00017.45
8.1.50.0050.00317.41
8.1.40.0040.00417.38
8.1.30.0000.00917.58
8.1.20.0040.00417.63
8.1.10.0040.00417.45
8.1.00.0040.00417.45
8.0.300.0040.00418.77
8.0.290.0040.00416.58
8.0.280.0030.00318.43
8.0.270.0000.00717.22
8.0.260.0030.00317.24
8.0.250.0080.00016.89
8.0.240.0030.00616.91
8.0.230.0000.00716.88
8.0.220.0000.00616.79
8.0.210.0040.00416.73
8.0.200.0060.00016.90
8.0.190.0030.00616.82
8.0.180.0060.00316.79
8.0.170.0040.00416.92
8.0.160.0070.00016.86
8.0.150.0080.00016.88
8.0.140.0070.00016.68
8.0.130.0050.00013.21
8.0.120.0030.00616.84
8.0.110.0050.00316.75
8.0.100.0000.00716.79
8.0.90.0050.00216.66
8.0.80.0100.00616.76
8.0.70.0040.00416.71
8.0.60.0000.00816.71
8.0.50.0040.00416.63
8.0.30.0100.00817.20
8.0.20.0120.00717.40
8.0.10.0030.00516.71
8.0.00.0100.01016.84
7.4.330.0000.00615.08
7.4.320.0060.00016.52
7.4.300.0070.00016.50
7.4.290.0000.00816.50
7.4.280.0060.00616.57
7.4.270.0000.00716.59
7.4.260.0030.00316.54
7.4.250.0040.00416.46
7.4.240.0020.00516.56
7.4.230.0040.00416.45
7.4.220.0110.00716.38
7.4.210.0000.01416.58
7.4.200.0030.00316.64
7.4.160.0160.00816.38
7.4.150.0120.00617.40
7.4.140.0070.01117.86
7.4.130.0100.01016.45
7.4.120.0140.00316.56
7.4.110.0150.00316.36
7.4.100.0120.00616.45
7.4.90.0130.00716.42
7.4.80.0090.00919.39
7.4.70.0080.01116.46
7.4.60.0120.00616.52
7.4.50.0030.00516.23
7.4.40.0140.00316.36
7.4.30.0110.00716.58
7.4.00.0080.00914.94
7.3.330.0030.00313.43
7.3.320.0060.00013.51
7.3.310.0040.00316.33
7.3.300.0000.00616.32
7.3.290.0050.01316.38
7.3.280.0090.00816.42
7.3.270.0090.00817.40
7.3.260.0090.00816.49
7.3.250.0120.00516.55
7.3.240.0070.01116.41
7.3.230.0100.01416.64
7.3.210.0110.00616.46
7.3.200.0180.00416.61
7.3.190.0080.00816.45
7.3.180.0040.01216.39
7.3.170.0070.01016.55
7.3.160.0030.01916.43
7.2.330.0060.01216.45
7.2.320.0090.00916.54
7.2.310.0060.01016.71
7.2.300.0170.00716.83
7.2.290.0090.00916.84
7.2.60.0070.00716.47
7.2.00.0030.01319.59
7.1.200.0030.00615.71
7.1.100.0140.00318.18
7.1.70.0030.00617.28
7.1.60.0070.01720.03
7.1.50.0150.00616.95
7.1.00.0070.07322.36
7.0.200.0120.00016.81
7.0.60.0030.09020.07
7.0.50.0070.04017.72
7.0.40.0130.03720.20
7.0.30.0230.08320.26
7.0.20.0230.06020.09
7.0.10.0230.04020.20
7.0.00.0070.04720.18
5.6.280.0030.03321.08
5.6.210.0170.07020.52
5.6.200.0130.07318.30
5.6.190.0070.07020.70
5.6.180.0000.09020.54
5.6.170.0270.07020.63
5.6.160.0070.08320.54
5.6.150.0070.03718.30
5.6.140.0130.04018.30
5.6.130.0130.07318.31
5.6.120.0100.08721.15
5.6.110.0170.08021.07
5.6.100.0100.05320.94
5.6.90.0070.07321.06
5.6.80.0130.07720.33
5.6.70.0230.05320.55
5.5.350.0070.08020.37
5.5.340.0130.07317.98
5.5.330.0130.04720.25
5.5.320.0000.09320.37
5.5.310.0200.04020.26
5.5.300.0070.03318.05
5.5.290.0130.07318.01
5.5.280.0070.07020.73
5.5.270.0000.05720.78
5.5.260.0070.08020.92
5.5.250.0100.06720.62
5.5.240.0100.07320.31
5.4.450.0670.04319.67
5.4.440.0700.05019.23
5.4.430.0530.05319.26
5.4.420.0570.05719.54
5.4.410.0530.05319.39
5.4.400.0500.05319.38
5.4.390.0530.05319.39
5.4.380.0530.04719.22
5.4.370.0400.06019.07
5.4.360.0670.05319.05
5.4.350.0500.04719.38
5.4.340.0470.05019.32
5.4.320.0700.06719.12
5.4.310.0400.06019.37
5.4.300.0830.06719.04
5.4.290.0430.05319.19
5.4.280.0600.06719.20
5.4.270.0630.06719.37
5.4.260.0470.05719.14
5.4.250.0700.05019.19
5.4.240.0700.04719.21
5.4.230.0630.04719.21
5.4.220.0600.06719.32
5.4.210.0600.05019.20
5.4.200.0470.04716.95
5.4.190.0430.05019.06
5.4.180.0530.05019.06
5.4.170.0570.05719.21
5.4.160.0430.05319.06
5.4.150.0600.05319.16
5.4.140.0470.05016.71
5.4.130.0600.04316.29
5.4.120.0670.03716.39
5.4.110.0600.05316.50
5.4.100.0530.05016.38
5.4.90.0670.05716.50
5.4.80.0500.05716.48
5.4.70.0570.05716.46
5.4.60.0530.05316.28
5.4.50.0630.05316.46
5.4.40.0670.06316.55
5.4.30.0730.05316.27
5.4.20.0530.07016.48
5.4.10.0470.04716.66
5.4.00.0500.04315.85

preferences:
56 ms | 400 KiB | 5 Q