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. if (empty($arguments)) { 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@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.0150.00016.88
8.3.50.0030.01521.11
8.3.40.0120.00318.84
8.3.30.0130.00318.55
8.3.20.0080.00020.21
8.3.10.0000.00721.87
8.3.00.0080.00019.68
8.2.180.0070.00725.92
8.2.170.0140.00018.96
8.2.160.0140.00022.96
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0050.00326.16
8.2.120.0040.00417.50
8.2.110.0100.00022.12
8.2.100.0000.01117.50
8.2.90.0040.00419.08
8.2.80.0000.00817.97
8.2.70.0030.00617.38
8.2.60.0040.00417.68
8.2.50.0060.00318.07
8.2.40.0000.00821.04
8.2.30.0050.00319.91
8.2.20.0040.00417.57
8.2.10.0030.00517.89
8.2.00.0040.00417.88
8.1.280.0060.00925.92
8.1.270.0070.01121.95
8.1.260.0080.00026.35
8.1.250.0070.00728.09
8.1.240.0090.00022.42
8.1.230.0090.00317.42
8.1.220.0030.00517.74
8.1.210.0030.00618.77
8.1.200.0030.00617.35
8.1.190.0040.00417.10
8.1.180.0080.00018.10
8.1.170.0040.00418.50
8.1.160.0050.00322.03
8.1.150.0050.00318.76
8.1.140.0060.00317.35
8.1.130.0030.00317.57
8.1.120.0000.00717.39
8.1.110.0030.00617.34
8.1.100.0000.00717.23
8.1.90.0000.00717.25
8.1.80.0000.00717.24
8.1.70.0030.00317.24
8.1.60.0040.00417.56
8.1.50.0040.00417.47
8.1.40.0030.00517.42
8.1.30.0030.00617.57
8.1.20.0050.00317.55
8.1.10.0000.00717.43
8.1.00.0000.00717.42
8.0.300.0070.00018.77
8.0.290.0000.00716.63
8.0.280.0030.00318.38
8.0.270.0030.00317.21
8.0.260.0000.00717.24
8.0.250.0040.00416.94
8.0.240.0040.00716.93
8.0.230.0030.00516.91
8.0.220.0030.00316.80
8.0.210.0000.00816.86
8.0.200.0000.00616.77
8.0.190.0080.00016.84
8.0.180.0030.00616.93
8.0.170.0060.00316.77
8.0.160.0000.00716.74
8.0.150.0030.00516.80
8.0.140.0030.00516.82
8.0.130.0000.00613.31
8.0.120.0000.00916.85
8.0.110.0000.00716.75
8.0.100.0030.00516.75
8.0.90.0000.00716.74
8.0.80.0120.00616.71
8.0.70.0020.00516.70
8.0.60.0040.00416.57
8.0.50.0060.00316.84
8.0.30.0090.01217.12
8.0.20.0100.00817.40
8.0.10.0070.00016.95
8.0.00.0110.00716.67
7.4.330.0000.00515.08
7.4.320.0000.00616.56
7.4.300.0070.00016.35
7.4.290.0000.00716.55
7.4.280.0000.00916.44
7.4.270.0000.00716.55
7.4.260.0000.00816.53
7.4.250.0070.00016.52
7.4.240.0000.00716.51
7.4.230.0000.00716.45
7.4.220.0080.01316.59
7.4.210.0070.00716.56
7.4.200.0030.00316.55
7.4.160.0100.00616.56
7.4.150.0070.01017.40
7.4.140.0180.00317.86
7.4.130.0080.01016.44
7.4.120.0080.00916.52
7.4.110.0090.00916.32
7.4.100.0060.01216.59
7.4.90.0060.01116.54
7.4.80.0140.00919.39
7.4.70.0140.00316.38
7.4.60.0060.00916.55
7.4.50.0030.00616.59
7.4.40.0080.00916.40
7.4.30.0100.01016.75
7.4.00.0060.00614.93
7.3.330.0060.00013.46
7.3.320.0060.00013.40
7.3.310.0030.00316.39
7.3.300.0070.00016.43
7.3.290.0080.00916.42
7.3.280.0100.01016.40
7.3.270.0090.00917.40
7.3.260.0120.00616.75
7.3.250.0090.00816.54
7.3.240.0070.01016.50
7.3.230.0170.00016.61
7.3.210.0140.00416.50
7.3.200.0050.01416.41
7.3.190.0060.00916.40
7.3.180.0070.01416.48
7.3.170.0070.01016.54
7.3.160.0130.00716.72
7.2.330.0100.01016.84
7.2.320.0060.01216.46
7.2.310.0100.00716.32
7.2.300.0030.01316.69
7.2.290.0110.01116.41
7.2.60.0030.01016.62
7.2.00.0040.01119.43
7.1.200.0030.00315.88
7.1.100.0100.00617.72
7.1.70.0000.00717.19
7.1.60.0070.01720.03
7.1.50.0100.01316.98
7.1.00.0030.07722.36
7.0.200.0110.00716.82
7.0.60.0170.07719.83
7.0.50.0070.04317.90
7.0.40.0100.07320.05
7.0.30.0500.07020.04
7.0.20.0230.04720.09
7.0.10.0270.07320.15
7.0.00.0030.05720.20
5.6.280.0030.03021.19
5.6.210.0030.08320.65
5.6.200.0070.08318.25
5.6.190.0030.05720.56
5.6.180.0070.07720.64
5.6.170.0200.04720.52
5.6.160.0100.05020.57
5.6.150.0070.03718.23
5.6.140.0100.04718.31
5.6.130.0030.08318.25
5.6.120.0030.04721.07
5.6.110.0130.05321.05
5.6.100.0070.08321.01
5.6.90.0030.04321.15
5.6.80.0030.04020.43
5.6.70.3700.03720.42
5.5.350.0070.07720.45
5.5.340.0070.03718.08
5.5.330.0130.08020.20
5.5.320.0030.08320.41
5.5.310.0270.07320.30
5.5.300.0070.06018.11
5.5.290.0000.05018.05
5.5.280.0070.06020.92
5.5.270.0030.08720.81
5.5.260.0030.04720.72
5.5.250.0100.05020.66
5.5.240.0070.08020.23
5.4.450.0500.06319.55
5.4.440.0500.07019.68
5.4.430.0570.05319.62
5.4.420.0630.06319.39
5.4.410.0530.05719.13
5.4.400.0430.05018.91
5.4.390.0570.06019.08
5.4.380.0530.05319.32
5.4.370.0100.06019.21
5.4.360.0100.08019.29
5.4.350.0170.05018.95
5.4.340.0130.05719.35
5.4.320.0070.06319.13
5.4.310.0430.05019.39
5.4.300.0470.07019.21
5.4.290.0230.05019.21
5.4.280.0370.05019.29
5.4.270.0530.05719.21
5.4.260.0470.04719.36
5.4.250.0600.05019.04
5.4.240.0030.06319.29
5.4.230.0100.06318.93
5.4.220.0130.06319.04
5.4.210.0200.04719.09
5.4.200.0500.05716.76
5.4.190.0700.04319.41
5.4.180.0130.05319.09
5.4.170.0030.08019.41
5.4.160.0330.07019.09
5.4.150.0200.08019.03
5.4.140.0270.05316.41
5.4.130.0170.04716.55
5.4.120.0130.05016.55
5.4.110.0230.04716.41
5.4.100.0300.05016.32
5.4.90.0200.05316.50
5.4.80.0300.04016.53
5.4.70.0200.06016.53
5.4.60.0330.06016.29
5.4.50.0500.06016.53
5.4.40.0300.04716.41
5.4.30.0130.05316.26
5.4.20.0300.04016.37
5.4.10.0230.05316.51
5.4.00.0200.06015.79

preferences:
92.43 ms | 401 KiB | 5 Q