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('@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.0150.00016.75
8.3.50.0110.00821.08
8.3.40.0110.00418.71
8.3.30.0000.01418.69
8.3.20.0080.00020.16
8.3.10.0000.00721.77
8.3.00.0000.00919.66
8.2.180.0060.00816.50
8.2.170.0100.01022.96
8.2.160.0100.00720.43
8.2.150.0040.00424.18
8.2.140.0090.00624.66
8.2.130.0080.00026.16
8.2.120.0050.00317.63
8.2.110.0090.00020.53
8.2.100.0080.00417.63
8.2.90.0090.00018.86
8.2.80.0080.00017.97
8.2.70.0050.00317.50
8.2.60.0080.00017.80
8.2.50.0040.00418.07
8.2.40.0050.00321.18
8.2.30.0060.00318.00
8.2.20.0030.00517.50
8.2.10.0000.00717.92
8.2.00.0040.00417.98
8.1.280.0100.00625.92
8.1.270.0040.00420.30
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0060.00319.01
8.1.230.0040.00817.42
8.1.220.0040.00417.74
8.1.210.0050.00318.77
8.1.200.0030.00617.13
8.1.190.0000.00817.10
8.1.180.0040.00418.10
8.1.170.0040.00418.46
8.1.160.0000.00821.95
8.1.150.0070.00018.70
8.1.140.0040.00417.31
8.1.130.0030.00317.62
8.1.120.0070.00017.38
8.1.110.0000.01117.36
8.1.100.0000.00817.41
8.1.90.0000.00717.28
8.1.80.0000.00917.33
8.1.70.0030.00317.32
8.1.60.0000.00717.48
8.1.50.0000.00817.41
8.1.40.0040.00417.46
8.1.30.0060.00317.59
8.1.20.0040.00417.63
8.1.10.0020.00517.35
8.1.00.0040.00417.39
8.0.300.0040.00418.77
8.0.290.0000.00716.63
8.0.280.0030.00318.31
8.0.270.0040.00417.05
8.0.260.0000.00617.27
8.0.250.0070.00016.77
8.0.240.0000.01016.82
8.0.230.0000.00716.84
8.0.220.0070.00016.83
8.0.210.0030.00616.82
8.0.200.0030.00316.93
8.0.190.0050.00316.82
8.0.180.0040.00816.84
8.0.170.0060.00316.79
8.0.160.0070.00016.92
8.0.150.0030.00416.84
8.0.140.0000.00816.85
8.0.130.0050.00013.30
8.0.120.0080.00016.82
8.0.110.0050.00216.80
8.0.100.0000.00716.66
8.0.90.0040.00416.76
8.0.80.0030.01316.81
8.0.70.0020.00516.53
8.0.60.0000.00716.67
8.0.50.0000.00816.67
8.0.30.0090.00817.16
8.0.20.0150.00817.40
8.0.10.0050.00316.85
8.0.00.0140.00416.77
7.4.330.0000.00515.08
7.4.320.0000.00616.47
7.4.300.0030.00316.46
7.4.290.0020.00516.55
7.4.280.0030.00616.49
7.4.270.0030.00316.59
7.4.260.0030.00416.39
7.4.250.0030.00616.43
7.4.240.0040.00316.42
7.4.230.0000.00716.63
7.4.220.0070.01116.54
7.4.210.0100.01016.55
7.4.200.0000.00816.29
7.4.160.0140.01016.39
7.4.150.0120.00617.40
7.4.140.0080.01517.86
7.4.130.0090.01216.62
7.4.120.0070.01016.60
7.4.110.0090.00916.32
7.4.100.0090.00916.31
7.4.90.0150.00316.54
7.4.80.0090.00919.39
7.4.70.0120.00416.26
7.4.60.0030.01416.36
7.4.50.0000.00816.53
7.4.40.0150.00616.41
7.4.30.0080.01516.48
7.4.00.0000.01614.91
7.3.330.0050.00313.30
7.3.320.0030.00313.43
7.3.310.0030.00516.34
7.3.300.0000.00616.48
7.3.290.0090.01116.47
7.3.280.0140.00516.43
7.3.270.0120.00417.40
7.3.260.0090.00916.50
7.3.250.0120.00616.51
7.3.240.0110.01116.40
7.3.230.0090.00916.63
7.3.210.0060.01116.40
7.3.200.0120.01116.38
7.3.190.0060.01016.51
7.3.180.0000.01616.42
7.3.170.0100.00716.43
7.3.160.0070.01016.73
7.2.330.0110.00716.79
7.2.320.0170.00016.81
7.2.310.0040.01316.79
7.2.300.0100.00716.50
7.2.290.0070.01816.52
7.2.60.0040.01216.82
7.2.00.0000.01219.67
7.1.200.0140.00915.43
7.1.100.0110.00718.29
7.1.70.0070.00717.38
7.1.60.0040.02120.03
7.1.50.0070.01017.11
7.1.00.0030.07722.41
7.0.200.0030.01016.91
7.0.60.0070.05319.94
7.0.50.0100.03717.84
7.0.40.0100.05720.11
7.0.30.0100.04720.08
7.0.20.0400.04020.26
7.0.10.0100.09020.30
7.0.00.0070.08320.15
5.6.280.0030.08020.90
5.6.210.0200.07020.81
5.6.200.0070.05018.30
5.6.190.0070.05720.70
5.6.180.0270.08320.50
5.6.170.0270.08020.62
5.6.160.0170.05020.61
5.6.150.0030.08718.34
5.6.140.0070.03718.33
5.6.130.0000.06318.23
5.6.120.0100.08321.03
5.6.110.0170.07321.08
5.6.100.0030.04721.04
5.6.90.0030.04321.05
5.6.80.0100.07720.55
5.5.350.2900.05020.38
5.5.340.0100.06318.02
5.5.330.0100.04720.34
5.5.320.0370.07020.41
5.5.310.0100.06320.41
5.5.300.0100.05717.98
5.5.290.0130.07718.05
5.5.280.0130.08021.02
5.5.270.0130.06020.82
5.5.260.0130.07721.03
5.5.250.0130.08320.64
5.5.240.0170.04320.31
5.4.450.0170.04019.55
5.4.440.0270.06719.45
5.4.430.0300.07019.26
5.4.420.0200.05019.47
5.4.410.0430.05719.41
5.4.400.0270.07718.93
5.4.390.0370.07019.30
5.4.380.0370.05319.29
5.4.370.0370.06719.29
5.4.360.0330.07019.38
5.4.350.0300.04019.30
5.4.340.0330.06719.02
5.4.320.0370.05719.30
5.4.310.0300.05319.38
5.4.300.0330.07018.91
5.4.290.0400.07019.15
5.4.280.0330.06019.28
5.4.270.0270.05019.38
5.4.260.0330.06719.29
5.4.250.0300.06719.05
5.4.240.0300.06319.31
5.4.230.0330.06319.25
5.4.220.0270.05019.04
5.4.210.0270.07019.00
5.4.200.0300.04319.14
5.4.190.0270.04019.25
5.4.180.0270.05319.37
5.4.170.0270.05319.27
5.4.160.0370.03319.21
5.4.150.0300.06019.05
5.4.140.0270.05316.36
5.4.130.0400.06316.52
5.4.120.0370.05716.32
5.4.110.0300.06716.37
5.4.100.0470.05316.45
5.4.90.0300.06316.51
5.4.80.0370.05316.52

preferences:
56.06 ms | 401 KiB | 5 Q