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)', 'unnecessary 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@test5b', ['@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.0000.01516.38
8.3.50.0130.00621.25
8.3.40.0080.00818.64
8.3.30.0130.00318.71
8.3.20.0000.01520.31
8.3.10.0040.00421.82
8.3.00.0040.00419.55
8.2.180.0130.01016.50
8.2.170.0110.00322.96
8.2.160.0100.00320.52
8.2.150.0040.00424.18
8.2.140.0070.00024.66
8.2.130.0040.00426.16
8.2.120.0090.00017.63
8.2.110.0100.00021.00
8.2.100.0030.00917.59
8.2.90.0000.00819.08
8.2.80.0000.00917.97
8.2.70.0030.00717.50
8.2.60.0030.00717.93
8.2.50.0030.00518.07
8.2.40.0040.00421.15
8.2.30.0040.00419.76
8.2.20.0050.00217.64
8.2.10.0040.00417.92
8.2.00.0070.00017.90
8.1.280.0030.01225.92
8.1.270.0050.00320.30
8.1.260.0080.00026.35
8.1.250.0050.00328.09
8.1.240.0030.00624.02
8.1.230.0090.00318.95
8.1.220.0060.00317.74
8.1.210.0040.00418.77
8.1.200.0090.00017.36
8.1.190.0030.00617.10
8.1.180.0050.00218.10
8.1.170.0040.00418.57
8.1.160.0040.00422.02
8.1.150.0040.00418.77
8.1.140.0040.00417.28
8.1.130.0000.00717.44
8.1.120.0040.00417.31
8.1.110.0070.00317.36
8.1.100.0000.00717.26
8.1.90.0000.00717.41
8.1.80.0000.00717.23
8.1.70.0000.00717.31
8.1.60.0000.00817.57
8.1.50.0040.00417.49
8.1.40.0040.00417.43
8.1.30.0030.00517.56
8.1.20.0000.00717.61
8.1.10.0040.00417.48
8.1.00.0000.00917.31
8.0.300.0040.00418.77
8.0.290.0030.00516.58
8.0.280.0030.00318.30
8.0.270.0030.00317.25
8.0.260.0030.00317.12
8.0.250.0050.00216.92
8.0.240.0000.01016.83
8.0.230.0040.00316.73
8.0.220.0000.00716.85
8.0.210.0040.00416.73
8.0.200.0000.00616.86
8.0.190.0000.00816.91
8.0.180.0060.00316.74
8.0.170.0070.00316.82
8.0.160.0000.00716.84
8.0.150.0000.00816.80
8.0.140.0000.00716.75
8.0.130.0060.00013.24
8.0.120.0030.00516.88
8.0.110.0000.00816.77
8.0.100.0000.00716.78
8.0.90.0000.00816.73
8.0.80.0070.01016.73
8.0.70.0040.00416.82
8.0.60.0070.00016.73
8.0.50.0000.00916.57
8.0.30.0090.00916.89
8.0.20.0070.01117.40
8.0.10.0000.00816.88
8.0.00.0080.00916.68
7.4.330.0020.00215.08
7.4.320.0030.00316.35
7.4.300.0080.00016.41
7.4.290.0040.00416.46
7.4.280.0090.00316.46
7.4.270.0050.00216.52
7.4.260.0040.00416.52
7.4.250.0090.00016.52
7.4.240.0020.00516.41
7.4.230.0050.00516.44
7.4.220.0160.00916.58
7.4.210.0110.00316.42
7.4.200.0030.00316.57
7.4.160.0070.01016.30
7.4.150.0120.00617.40
7.4.140.0110.00917.86
7.4.130.0040.01916.47
7.4.120.0080.00916.60
7.4.110.0110.00716.46
7.4.100.0140.01016.55
7.4.90.0110.01216.43
7.4.80.0130.01019.39
7.4.70.0100.00716.55
7.4.60.0150.00816.33
7.4.50.0030.00616.36
7.4.40.0090.00916.52
7.4.30.0140.00316.48
7.4.00.0000.01514.80
7.3.330.0000.00513.43
7.3.320.0000.00513.40
7.3.310.0030.00516.48
7.3.300.0000.00716.44
7.3.290.0070.01116.44
7.3.280.0070.01016.39
7.3.270.0120.00617.40
7.3.260.0090.00916.41
7.3.250.0110.01016.45
7.3.240.0100.00716.55
7.3.230.0140.00416.58
7.3.210.0120.00616.59
7.3.200.0100.01316.45
7.3.190.0080.00816.50
7.3.180.0070.02716.47
7.3.170.0130.01116.50
7.3.160.0060.01216.55
7.3.10.0110.00716.60
7.3.00.0080.00516.36
7.2.330.0080.00816.73
7.2.320.0120.00616.53
7.2.310.0060.01216.79
7.2.300.0100.01416.80
7.2.290.0060.01716.67
7.2.130.0070.01216.41
7.2.120.0110.00416.51
7.2.110.0050.01216.67
7.2.100.0070.00716.73
7.2.90.0070.01216.83
7.2.80.0100.00416.67
7.2.70.0100.00716.85
7.2.60.0080.00816.65
7.2.50.0100.01016.82
7.2.40.0110.00916.82
7.2.30.0130.00716.72
7.2.20.0130.01216.82
7.2.10.0110.00916.66
7.2.00.0050.01016.78
7.1.250.0110.00715.74
7.1.200.0060.00015.84
7.1.100.0130.00318.12
7.1.70.0000.00817.02
7.1.60.0070.01720.03
7.1.50.0160.00916.93
7.1.00.0030.07722.36
7.0.200.0100.01016.88
7.0.60.0070.07319.96
7.0.50.0070.07717.81
7.0.40.0100.04020.13
7.0.30.0230.03720.13
7.0.20.0270.04720.09
7.0.10.0030.04720.06
7.0.00.0100.04020.16
5.6.280.0000.03320.90
5.6.210.0030.08720.78
5.6.200.0000.06718.22
5.6.190.0070.04020.68
5.6.180.3470.04020.48
5.6.170.0300.03320.61
5.6.160.0000.04320.54
5.6.150.0130.06018.28
5.6.140.0030.05318.24
5.6.130.0030.07718.25
5.6.120.0030.07321.09
5.6.110.0130.07721.02
5.6.100.0100.08021.01
5.6.90.0030.09321.04
5.6.80.0000.04720.56
5.6.70.4500.04020.48
5.5.350.0070.03720.38
5.5.340.0200.07318.16
5.5.330.0100.03720.28
5.5.320.0370.07020.34
5.5.310.0270.04320.44
5.5.300.0100.07318.14
5.5.290.0100.08318.01
5.5.280.0000.05721.04
5.5.270.0130.08021.01
5.5.260.0070.04020.91
5.5.250.0100.08720.73
5.5.240.0230.07020.21
5.4.450.0630.06019.52
5.4.440.0700.05019.62
5.4.430.0630.05319.40
5.4.420.0670.05319.54
5.4.410.0730.04319.55
5.4.400.0630.06019.21
5.4.390.0600.06019.47
5.4.380.0770.06019.29
5.4.370.0600.05718.91
5.4.360.0630.04318.93
5.4.350.0570.04718.98
5.4.340.0600.04718.91
5.4.320.0730.05319.22
5.4.310.0600.05019.20
5.4.300.0700.04718.90
5.4.290.0630.05319.04
5.4.280.0770.04319.37
5.4.270.0500.05719.09
5.4.260.0530.05319.35
5.4.250.0630.06019.47
5.4.240.0730.04319.34
5.4.230.0730.05319.44
5.4.220.0630.05319.34
5.4.210.0530.06319.23
5.4.200.0670.04716.76
5.4.190.0670.05719.20
5.4.180.0670.05319.19
5.4.170.0830.04019.20
5.4.160.0730.04719.25
5.4.150.0570.07019.19
5.4.140.0530.04716.56
5.4.130.0500.04716.44
5.4.120.0670.05316.56
5.4.110.0600.04316.46
5.4.100.0500.05016.40
5.4.90.0570.05316.56
5.4.80.0630.03716.39
5.4.70.0600.04016.53
5.4.60.0570.04316.30
5.4.50.0630.03716.36
5.4.40.0500.05016.36
5.4.30.0570.04016.28
5.4.20.0570.06716.39
5.4.10.0530.05016.27
5.4.00.0500.05315.86

preferences:
57.55 ms | 401 KiB | 5 Q