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) !== \'\'))'); // Make sure we don't translate unnecessarily. assert('empty($arguments) || strtr($string, $arguments) != implode($arguments)'); } test_assert('@test', ['@test' => '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.40.0100.01018.49
8.3.30.0070.00718.73
8.3.20.0000.00720.29
8.3.10.0040.00423.53
8.3.00.0050.00319.39
8.2.170.0120.00322.96
8.2.160.0060.00920.35
8.2.150.0080.00024.18
8.2.140.0110.00424.66
8.2.130.0000.00826.16
8.2.120.0000.00817.50
8.2.110.0060.00319.26
8.2.100.0080.00417.50
8.2.90.0040.00419.05
8.2.80.0030.00617.97
8.2.70.0080.00017.50
8.2.60.0000.00817.91
8.2.50.0060.00318.07
8.2.40.0050.00321.07
8.2.30.0060.00319.64
8.2.20.0040.00417.61
8.2.10.0040.00417.98
8.2.00.0050.00217.93
8.1.270.0050.00320.33
8.1.260.0000.00826.35
8.1.250.0080.00028.09
8.1.240.0060.00323.98
8.1.230.0000.01217.42
8.1.220.0050.00317.74
8.1.210.0000.00818.77
8.1.200.0060.00317.13
8.1.190.0030.00516.88
8.1.180.0000.00818.10
8.1.170.0000.00818.52
8.1.160.0000.00821.85
8.1.150.0000.00818.80
8.1.140.0030.00617.36
8.1.130.0000.00817.47
8.1.120.0000.00717.35
8.1.110.0000.00917.36
8.1.100.0040.00417.32
8.1.90.0050.00217.20
8.1.80.0030.00517.21
8.1.70.0040.00417.27
8.1.60.0080.00017.36
8.1.50.0030.00617.44
8.1.40.0040.00417.46
8.1.30.0030.00517.55
8.1.20.0000.00817.54
8.1.10.0040.00417.34
8.1.00.0000.00817.27
8.0.300.0040.00418.77
8.0.290.0000.00716.63
8.0.280.0040.00418.32
8.0.270.0030.00317.05
8.0.260.0040.00417.12
8.0.250.0040.00416.85
8.0.240.0040.00716.82
8.0.230.0000.00716.91
8.0.220.0040.00416.86
8.0.210.0000.00816.84
8.0.200.0060.00016.85
8.0.190.0040.00416.78
8.0.180.0040.00416.88
8.0.170.0060.00316.78
8.0.160.0040.00416.82
8.0.150.0040.00416.68
8.0.140.0000.00716.81
8.0.130.0000.00513.27
8.0.120.0030.00516.70
8.0.110.0000.00816.81
8.0.100.0000.00716.71
8.0.90.0000.00716.89
8.0.80.0090.00916.84
8.0.70.0040.00416.79
8.0.60.0050.00316.95
8.0.50.0000.00716.70
8.0.30.0120.00817.07
8.0.20.0100.01417.40
8.0.10.0040.00416.91
8.0.00.0060.01116.86
7.4.330.0050.00015.08
7.4.320.0000.00616.51
7.4.300.0060.00016.54
7.4.290.0000.00716.46
7.4.280.0080.00316.50
7.4.270.0000.00716.44
7.4.260.0030.00316.48
7.4.250.0030.00616.43
7.4.240.0020.00616.46
7.4.230.0040.00416.26
7.4.220.0110.00716.52
7.4.210.0030.01016.41
7.4.200.0030.00316.46
7.4.160.0130.00716.35
7.4.150.0060.01217.40
7.4.140.0090.01117.86
7.4.130.0120.00616.54
7.4.120.0140.00316.49
7.4.110.0090.00916.60
7.4.100.0110.00616.49
7.4.90.0090.00916.38
7.4.80.0070.01419.39
7.4.70.0060.01316.27
7.4.60.0080.00816.57
7.4.50.0030.00516.45
7.4.40.0100.01316.61
7.4.30.0120.00416.51
7.4.00.0030.01314.89
7.3.330.0080.00013.38
7.3.320.0000.00713.20
7.3.310.0070.00016.34
7.3.300.0000.00816.39
7.3.290.0080.00716.31
7.3.280.0110.00916.38
7.3.270.0140.00317.40
7.3.260.0100.00616.30
7.3.250.0080.00916.35
7.3.240.0150.00616.39
7.3.230.0150.00316.39
7.3.210.0080.00816.21
7.3.200.0130.00616.34
7.3.190.0050.01316.35
7.3.180.0080.00816.31
7.3.170.0120.00916.31
7.3.160.0120.00516.30
7.2.330.0090.00916.39
7.2.320.0130.00316.70
7.2.310.0060.01016.42
7.2.300.0080.00816.68
7.2.290.0100.01316.36
7.2.60.0090.00616.60
7.2.00.0000.01219.45
7.1.200.0050.00215.80
7.1.100.0100.00718.22
7.1.70.0000.01016.80
7.1.60.0100.01320.03
7.1.50.0130.01016.99
7.1.00.0030.07022.35
7.0.200.0090.00316.77
7.0.60.0100.08019.92
7.0.50.0000.04017.90
7.0.40.0070.05720.20
7.0.30.0270.07020.09
7.0.20.0200.05020.06
7.0.10.0170.04020.33
7.0.00.0170.07720.45
5.6.280.0030.05321.07
5.6.210.0170.07320.55
5.6.200.0100.07718.27
5.6.190.0130.07320.46
5.6.180.0030.08320.57
5.6.170.0200.04020.46
5.6.160.0070.08020.54
5.6.150.0100.06318.21
5.6.140.0030.04018.13
5.6.130.0070.03718.15
5.6.120.0030.05321.04
5.6.110.0030.04021.09
5.6.100.0130.07321.14
5.6.90.0130.08721.00
5.6.80.0070.05020.48
5.6.70.0200.07020.28
5.5.350.0070.07720.43
5.5.340.0170.04317.96
5.5.330.0070.08320.19
5.5.320.0070.08320.27
5.5.310.0270.08020.39
5.5.300.0000.04718.09
5.5.290.0170.06717.94
5.5.280.0170.04720.85
5.5.270.0270.06720.75
5.5.260.0230.05320.79
5.5.250.0200.07320.46
5.5.240.0030.04320.19
5.4.450.0230.05319.48
5.4.440.0330.03719.61
5.4.430.0170.05019.63
5.4.420.0170.05019.38
5.4.410.0630.04719.59
5.4.400.0670.04719.15
5.4.390.0100.06019.38
5.4.380.0300.05319.02
5.4.370.0770.06319.37
5.4.360.0630.05019.30
5.4.350.0630.03319.30
5.4.340.0200.04719.30
5.4.320.0500.05319.05
5.4.310.0630.06719.26
5.4.300.0630.05319.30
5.4.290.0330.05319.15
5.4.280.0470.04719.14
5.4.270.0600.07319.16
5.4.260.0500.06019.15
5.4.250.0600.05319.12
5.4.240.0570.07318.97
5.4.230.0530.04719.37
5.4.220.0470.05719.21
5.4.210.0500.05719.00
5.4.200.0500.04316.93
5.4.190.0500.05019.14
5.4.180.0170.04718.98
5.4.170.0100.05719.07
5.4.160.0270.05319.14
5.4.150.0570.06019.17
5.4.140.0670.04716.41
5.4.130.0530.05316.54
5.4.120.0630.05016.70
5.4.110.0100.05016.53
5.4.100.0000.06716.31
5.4.90.0200.06016.53
5.4.80.0730.04716.37
5.4.70.0570.05316.36
5.4.60.0470.06016.48
5.4.50.0230.05016.50
5.4.40.0100.07016.52
5.4.30.0130.04716.47
5.4.20.0230.04716.57
5.4.10.0500.04716.37
5.4.00.0430.04316.00

preferences:
47.47 ms | 400 KiB | 5 Q