3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test_assert($string, $arguments = array()) { assert('$string !== \'\' && (empty($arguments) || strtr($string, $arguments) !== \'\')', 'empty fail:' . $string); 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.0070.00716.63
8.3.50.0120.00616.10
8.3.40.0160.00618.59
8.3.30.0110.00418.59
8.3.20.0040.00420.30
8.3.10.0050.00221.71
8.3.00.0040.00419.68
8.2.180.0090.00918.41
8.2.170.0110.00422.96
8.2.160.0140.00719.16
8.2.150.0000.00824.18
8.2.140.0030.00624.66
8.2.130.0070.00026.16
8.2.120.0080.00021.05
8.2.110.0070.00320.35
8.2.100.0110.00017.59
8.2.90.0080.00017.63
8.2.80.0050.00318.66
8.2.70.0040.00417.38
8.2.60.0000.00917.50
8.2.50.0060.00319.22
8.2.40.0100.00019.35
8.2.30.0040.00419.79
8.2.20.0040.00417.62
8.2.10.0000.00717.87
8.2.00.0040.00417.87
8.1.280.0100.00725.92
8.1.270.0060.00320.33
8.1.260.0080.00026.35
8.1.250.0060.00328.09
8.1.240.0060.00321.02
8.1.230.0090.00319.07
8.1.220.0030.00717.74
8.1.210.0080.00018.77
8.1.200.0000.00817.10
8.1.190.0040.00417.10
8.1.180.0000.00818.10
8.1.170.0060.00318.50
8.1.160.0030.00521.81
8.1.150.0000.00718.77
8.1.140.0080.00017.25
8.1.130.0070.00017.44
8.1.120.0000.00717.32
8.1.110.0080.00317.29
8.1.100.0000.00717.31
8.1.90.0000.00817.19
8.1.80.0000.00817.27
8.1.70.0000.00717.26
8.1.60.0040.00417.52
8.1.50.0030.00517.48
8.1.40.0030.00617.46
8.1.30.0040.00417.51
8.1.20.0030.00617.58
8.1.10.0080.00017.41
8.1.00.0040.00417.34
8.0.300.0060.00318.77
8.0.290.0050.00216.63
8.0.280.0070.00018.37
8.0.270.0040.00417.17
8.0.260.0000.00817.17
8.0.250.0050.00216.90
8.0.240.0060.00316.76
8.0.230.0050.00316.84
8.0.220.0030.00316.86
8.0.210.0000.01016.86
8.0.200.0000.00616.88
8.0.190.0000.00816.83
8.0.180.0040.00416.80
8.0.170.0040.00416.86
8.0.160.0000.00716.85
8.0.150.0050.00316.84
8.0.140.0030.00516.77
8.0.130.0000.00513.29
8.0.120.0030.00616.71
8.0.110.0040.00416.82
8.0.100.0040.00416.88
8.0.90.0040.00416.72
8.0.80.0090.00916.80
8.0.70.0050.00216.73
8.0.60.0070.00016.80
8.0.50.0080.00016.64
8.0.30.0080.01417.00
8.0.20.0110.00817.40
8.0.10.0030.00516.84
8.0.00.0090.01116.58
7.4.330.0000.00515.08
7.4.320.0000.00616.36
7.4.300.0030.00316.57
7.4.290.0040.00416.33
7.4.280.0040.00716.57
7.4.270.0080.00016.44
7.4.260.0000.00716.42
7.4.250.0040.00416.30
7.4.240.0020.00516.47
7.4.230.0030.00316.28
7.4.220.0090.00916.57
7.4.210.0140.00016.39
7.4.200.0040.00416.50
7.4.160.0100.00616.50
7.4.150.0180.00317.40
7.4.140.0100.00817.86
7.4.130.0080.01116.53
7.4.120.0050.01116.38
7.4.110.0030.01516.67
7.4.100.0100.01416.51
7.4.90.0060.01316.62
7.4.80.0120.00619.39
7.4.70.0090.01216.31
7.4.60.0080.00816.43
7.4.50.0040.00416.59
7.4.40.0130.00316.62
7.4.30.0070.01116.33
7.4.00.0030.01314.85
7.3.330.0040.00413.50
7.3.320.0000.00513.29
7.3.310.0030.00416.33
7.3.300.0070.00016.47
7.3.290.0080.00916.38
7.3.280.0130.00716.38
7.3.270.0180.00317.40
7.3.260.0080.00816.52
7.3.250.0070.01116.56
7.3.240.0060.01216.64
7.3.230.0100.00716.43
7.3.210.0100.00716.36
7.3.200.0180.00516.40
7.3.190.0000.01616.48
7.3.180.0080.00816.39
7.3.170.0150.00916.48
7.3.160.0170.00716.42
7.2.330.0030.01516.80
7.2.320.0090.00916.77
7.2.310.0170.00016.84
7.2.300.0070.01616.50
7.2.290.0070.01716.62
7.2.80.0030.00716.42
7.2.60.0070.00716.64
7.2.00.0030.00919.64
7.1.200.0070.00715.92
7.1.100.0100.00318.13
7.1.70.0040.00417.25
7.1.60.0070.01820.03
7.1.50.0170.00334.80
7.1.00.0030.07722.43
7.0.200.0070.01016.87
7.0.60.0000.04319.93
7.0.50.0030.05717.88
7.0.40.0070.07320.24
7.0.30.0430.04720.21
7.0.20.0300.04720.10
7.0.10.0100.06320.24
7.0.00.0030.04720.29
5.6.280.0070.06721.08
5.6.210.0030.06720.73
5.6.200.0030.08018.34
5.6.190.0200.08020.70
5.6.180.4100.03720.74
5.6.170.0370.07720.51
5.6.160.0030.05720.61
5.6.150.0070.05318.33
5.6.140.0030.07018.25
5.6.130.0000.04318.25
5.6.120.0030.04321.02
5.6.110.0070.08321.06
5.6.100.0100.08021.06
5.6.90.0030.08721.05
5.6.80.0070.06320.55
5.6.70.4200.04020.55
5.5.350.0030.07320.48
5.5.340.0030.06018.11
5.5.330.0100.04320.47
5.5.320.0330.07020.30
5.5.310.0270.07720.41
5.5.300.0030.06018.10
5.5.290.0070.04317.97
5.5.280.0100.07020.73
5.5.270.0070.07720.78
5.5.260.0170.08720.85
5.5.250.0030.05320.64
5.5.240.0300.06320.24
5.4.450.0500.05719.25
5.4.440.0470.06019.65
5.4.430.0200.06719.54
5.4.420.0130.06019.67
5.4.410.0170.05319.32
5.4.400.0230.04719.23
5.4.390.0200.05319.19
5.4.380.0130.05319.23
5.4.370.0170.05019.32
5.4.360.0230.04719.04
5.4.350.0170.06019.44
5.4.340.0270.04319.19
5.4.320.0170.05719.29
5.4.310.0200.05319.04
5.4.300.0200.05319.32
5.4.290.0130.05719.03
5.4.280.0230.04319.03
5.4.270.0130.05019.32
5.4.260.0600.04719.34
5.4.250.0130.06019.34
5.4.240.0230.04319.32
5.4.230.0070.06019.09
5.4.220.0330.04718.90
5.4.210.0270.05319.20
5.4.200.0200.05317.01
5.4.190.0170.06318.99
5.4.180.0230.04319.33
5.4.170.0200.05019.08
5.4.160.0100.05719.12
5.4.150.0430.06019.06
5.4.140.0230.05716.52
5.4.130.0270.06316.34
5.4.120.0270.05016.36
5.4.110.0230.04716.44
5.4.100.0170.05316.35
5.4.90.0200.05016.72
5.4.80.0130.04716.40
5.4.70.0030.05716.39
5.4.60.0430.05316.68
5.4.50.0470.05016.39
5.4.40.0530.04016.34
5.4.30.0430.05016.48
5.4.20.0570.05016.51
5.4.10.0470.05316.26
5.4.00.0530.05015.82

preferences:
56.85 ms | 400 KiB | 5 Q