3v4l.org

run code in 300+ PHP versions simultaneously
<?php function escape($string){ if(is_array($string)){ foreach($string as $key => $val){ unset($string[$key]); $string[escape($key)] = escape($val); } }else{ $string = preg_replace("(['\"\\\x1a])","\\ \0",$string); } return $string; } $x = "as'd"; print_r(escape($x));

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.0060.00818.55
8.3.50.0140.00318.42
8.3.40.0090.00618.84
8.3.30.0070.00718.91
8.3.20.0040.00420.22
8.3.10.0050.00323.51
8.3.00.0030.00719.15
8.2.180.0070.00718.54
8.2.170.0070.00722.96
8.2.160.0110.00420.47
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0080.00022.28
8.2.110.0040.00420.51
8.2.100.0050.00517.91
8.2.90.0080.00019.22
8.2.80.0060.00317.97
8.2.70.0030.00717.50
8.2.60.0000.01217.76
8.2.50.0030.00718.07
8.2.40.0000.00819.95
8.2.30.0000.00718.01
8.2.20.0080.00017.74
8.2.10.0000.00918.14
8.2.00.0000.00917.81
8.1.270.0040.00423.83
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0030.00623.83
8.1.230.0070.00319.14
8.1.220.0040.00417.79
8.1.210.0000.00918.77
8.1.200.0060.00317.23
8.1.190.0060.00317.23
8.1.180.0040.00418.10
8.1.170.0050.00318.62
8.1.160.0000.00721.83
8.1.150.0090.00218.87
8.1.140.0040.00417.41
8.1.130.0000.00717.88
8.1.120.0000.00817.58
8.1.110.0060.00317.49
8.1.100.0040.00417.56
8.1.90.0080.00017.57
8.1.80.0040.00417.51
8.1.70.0000.00717.55
8.1.60.0000.00817.72
8.1.50.0030.00517.68
8.1.40.0000.00817.49
8.1.30.0040.00417.82
8.1.20.0030.00517.64
8.1.10.0000.00817.60
8.1.00.0000.00817.54
8.0.300.0000.00718.77
8.0.290.0000.00716.88
8.0.280.0030.00518.34
8.0.270.0040.00417.13
8.0.260.0000.00717.25
8.0.250.0070.00017.11
8.0.240.0030.00316.99
8.0.230.0070.00017.01
8.0.220.0030.00317.00
8.0.210.0000.00716.84
8.0.200.0030.00316.93
8.0.190.0000.00817.04
8.0.180.0030.00316.91
8.0.170.0060.00316.99
8.0.160.0040.00416.98
8.0.150.0030.00516.82
8.0.140.0040.00416.88
8.0.130.0030.00313.44
8.0.120.0030.00516.96
8.0.110.0000.00816.86
8.0.100.0000.00716.82
8.0.90.0040.00416.89
8.0.80.0120.00616.95
8.0.70.0030.00416.86
8.0.60.0000.00716.86
8.0.50.0040.00417.01
8.0.30.0110.00817.26
8.0.20.0150.00417.40
8.0.10.0040.00416.89
8.0.00.0130.00316.98
7.4.330.0000.00615.00
7.4.320.0000.00816.67
7.4.300.0050.00316.80
7.4.290.0070.00016.71
7.4.280.0070.00016.79
7.4.270.0000.00716.76
7.4.260.0000.00716.82
7.4.250.0040.00416.76
7.4.240.0050.00216.70
7.4.230.0000.00716.82
7.4.220.0140.00316.84
7.4.210.0070.01316.84
7.4.200.0040.00416.84
7.4.160.0090.00616.68
7.4.150.0180.00617.40
7.4.140.0120.00717.86
7.4.130.0090.00816.63
7.4.120.0090.00816.51
7.4.110.0090.01216.67
7.4.100.0050.01116.65
7.4.90.0030.01416.68
7.4.80.0090.00919.39
7.4.70.0060.01016.61
7.4.60.0030.01416.70
7.4.50.0000.00416.44
7.4.40.0100.00716.61
7.4.30.0060.01016.69
7.4.00.0070.00914.99
7.3.330.0060.00013.42
7.3.320.0000.00513.27
7.3.310.0000.00716.31
7.3.300.0030.00316.25
7.3.290.0120.00616.36
7.3.280.0090.00816.41
7.3.270.0180.00017.40
7.3.260.0030.01816.40
7.3.250.0100.00816.55
7.3.240.0090.00616.45
7.3.230.0000.01716.61
7.3.210.0100.00716.63
7.3.200.0110.00819.39
7.3.190.0130.00616.80
7.3.180.0060.01116.71
7.3.170.0090.00816.82
7.3.160.0100.00616.53
7.3.120.0120.00614.80
7.3.110.0070.01015.08
7.3.100.0090.00615.16
7.3.90.0080.00614.83
7.3.80.0030.01015.25
7.3.70.0110.00014.69
7.3.60.0040.00814.57
7.3.50.0030.00714.63
7.3.40.0030.00614.85
7.3.30.0110.00715.00
7.3.20.0070.00716.53
7.3.10.0090.00916.53
7.3.00.0080.01016.61
7.2.330.0120.00616.72
7.2.320.0110.00716.64
7.2.310.0080.00816.80
7.2.300.0130.00316.76
7.2.290.0110.01116.82
7.2.250.0100.00715.30
7.2.240.0060.01215.21
7.2.230.0100.00715.42
7.2.220.0060.00315.12
7.2.210.0090.00915.03
7.2.200.0070.00714.99
7.2.190.0060.00914.95
7.2.180.0000.01515.14
7.2.170.0110.00415.07
7.2.130.0160.01116.74
7.2.120.0140.01116.67
7.2.110.0080.01216.55
7.2.100.0240.00316.78
7.2.90.0110.01116.49
7.2.80.0070.01716.54
7.2.70.0220.00016.29
7.2.60.0180.00716.41
7.2.50.0170.00616.36
7.2.40.0180.00716.27
7.2.30.0140.00616.34
7.2.20.0150.00616.18
7.2.10.0090.01316.28
7.2.00.0070.00718.23
7.1.330.0120.00315.84
7.1.320.0060.00615.97
7.1.310.0040.01115.90
7.1.300.0060.00315.87
7.1.290.0070.01115.94
7.1.280.0000.01216.07
7.1.270.0060.00915.96
7.1.260.0000.01415.88
7.1.250.0160.00815.51
7.1.100.0050.00318.33
7.1.70.0040.00417.42
7.1.60.0070.01419.32
7.1.50.0120.01517.00
7.1.00.0100.06722.59
7.0.200.0000.00916.89
7.0.140.0070.06721.97
7.0.70.4830.04319.85
7.0.60.0070.08020.00
7.0.50.0070.08017.90
7.0.40.0130.08020.14
7.0.30.0470.04320.14
7.0.20.0270.07320.07
7.0.10.0270.08020.31
7.0.00.0100.04720.16
5.6.280.0030.07321.07
5.6.210.0100.06720.66
5.6.200.0030.04018.12
5.6.190.0230.05020.45
5.6.180.0230.06720.40
5.6.170.0330.05320.71
5.6.160.0130.04720.56
5.6.150.0170.06018.20
5.6.140.0070.07718.28
5.6.130.0000.04318.11
5.6.120.0030.08320.99
5.6.110.0070.08021.12
5.6.100.0000.05321.01
5.6.90.0070.07020.98
5.6.80.0100.07720.49
5.6.70.0170.06720.53
5.5.350.0100.08020.47
5.5.340.0130.07318.02
5.5.330.0070.07020.35
5.5.320.0070.08320.32
5.5.310.0100.04320.35
5.5.300.0030.05317.97
5.5.290.0300.03318.06
5.5.280.0200.05720.96
5.5.270.0130.07720.88
5.5.260.0070.04320.96
5.5.250.0070.03720.66
5.5.240.0030.08020.26
5.4.450.0800.03719.17
5.4.440.0570.03719.54
5.4.430.0430.05319.38
5.4.420.0900.00019.34
5.4.410.0700.00019.27
5.4.400.0870.00019.13
5.4.390.0600.00019.13
5.4.380.0630.00019.02
5.4.370.0630.00019.21
5.4.360.0630.00019.13
5.4.350.0630.00019.13
5.4.340.0090.03212.02
5.4.320.0050.04312.50
5.4.310.0080.03912.50
5.4.300.0060.04812.51
5.4.290.0030.04112.50
5.4.280.0060.03512.40
5.4.270.0070.03612.39
5.4.260.0070.03812.39
5.4.250.0040.04112.40
5.4.240.0060.03912.40
5.4.230.0100.03712.39
5.4.220.0090.03412.39
5.4.210.0050.03612.39
5.4.200.0050.04412.39
5.4.190.0030.03912.39
5.4.180.0020.03912.39
5.4.170.0080.03412.39
5.4.160.0070.03412.39
5.4.150.0040.03712.39
5.4.140.0030.03912.07
5.4.130.0070.03412.05
5.4.120.0040.03812.02
5.4.110.0060.03712.01
5.4.100.0070.03512.02
5.4.90.0030.04212.02
5.4.80.0070.03612.01
5.4.70.0050.03512.01
5.4.60.0050.03612.01
5.4.50.0090.03212.00
5.4.40.0050.03612.00
5.4.30.0040.03711.99
5.4.20.0020.03811.99
5.4.10.0070.03511.99
5.4.00.0050.03711.48
5.3.290.0080.03712.80
5.3.280.0060.03812.71
5.3.270.0060.04612.72
5.3.260.0080.03912.72
5.3.250.0040.04412.72
5.3.240.0050.04312.71
5.3.230.0060.03812.71
5.3.220.0070.03612.68
5.3.210.0040.04112.68
5.3.200.0070.03512.68
5.3.190.0040.03912.68
5.3.180.0050.03612.67
5.3.170.0020.04112.67
5.3.160.0100.04012.68
5.3.150.0070.03712.67
5.3.140.0090.03812.66
5.3.130.0100.03812.66
5.3.120.0070.04012.66
5.3.110.0070.04112.66
5.3.100.0090.03612.12
5.3.90.0060.03712.10
5.3.80.0050.03912.09
5.3.70.0070.04112.09
5.3.60.0080.03712.08
5.3.50.0080.03412.02
5.3.40.0100.03412.02
5.3.30.0090.03411.98
5.3.20.0090.03711.76
5.3.10.0030.03711.73
5.3.00.0070.03511.72
5.2.170.0030.0339.21
5.2.160.0050.0309.21
5.2.150.0040.0319.21
5.2.140.0050.0319.21
5.2.130.0030.0309.17
5.2.120.0070.0289.17
5.2.110.0050.0299.18
5.2.100.0040.0349.17
5.2.90.0060.0359.18
5.2.80.0050.0309.17
5.2.70.0070.0299.17
5.2.60.0060.0309.13
5.2.50.0010.0359.09
5.2.40.0030.0319.08
5.2.30.0030.0379.05
5.2.20.0060.0309.04
5.2.10.0070.0268.94
5.2.00.0060.0308.80
5.1.60.0080.0208.09
5.1.50.0050.0268.09
5.1.40.0060.0288.06
5.1.30.0040.0308.41
5.1.20.0020.0308.43
5.1.10.0060.0298.16
5.1.00.0040.0268.16
5.0.50.0030.0226.64
5.0.40.0050.0186.50
5.0.30.0040.0326.30
5.0.20.0050.0186.27
5.0.10.0040.0206.26
5.0.00.0060.0296.25
4.4.90.0030.0154.78
4.4.80.0040.0144.76
4.4.70.0030.0154.76
4.4.60.0030.0174.75
4.4.50.0040.0154.77
4.4.40.0070.0214.71
4.4.30.0020.0164.76
4.4.20.0020.0164.84
4.4.10.0040.0144.85
4.4.00.0020.0264.76
4.3.110.0070.0114.66
4.3.100.0020.0164.66
4.3.90.0020.0154.63
4.3.80.0040.0244.59
4.3.70.0020.0154.63
4.3.60.0050.0124.63
4.3.50.0030.0164.63
4.3.40.0010.0264.54
4.3.30.0010.0183.30
4.3.20.0030.0153.27
4.3.10.0020.0163.24
4.3.00.0070.01310.35

preferences:
64.02 ms | 400 KiB | 5 Q