3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = "aa\" b \x27 c"; $sum = 0; $inputs = explode("\n", $input); echo addslashes($input); for($i = 0; $i<count($inputs); $i++){ $ns = addslashes($inputs[$i]); for($j = 0; $j<strlen($ns); $j++){ $sum++; if(preg_match("/\\^[\"]/",$ns)>0){ $sum+=2; } } //$sum-= strlen($inputs[$i]); } echo $sum;

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.0100.01018.43
8.3.50.0120.00916.79
8.3.40.0120.00318.71
8.3.30.0000.01418.78
8.3.20.0070.00020.33
8.3.10.0000.00823.66
8.3.00.0040.00419.97
8.2.180.0150.00018.54
8.2.170.0080.00822.96
8.2.160.0100.01020.55
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0050.00319.27
8.2.120.0080.00026.35
8.2.110.0070.00320.30
8.2.100.0110.00018.16
8.2.90.0000.00819.09
8.2.80.0050.00317.97
8.2.70.0050.00518.00
8.2.60.0060.00317.93
8.2.50.0000.00818.07
8.2.40.0090.00320.57
8.2.30.0070.00020.54
8.2.20.0040.00417.80
8.2.10.0030.00718.16
8.2.00.0030.00618.16
8.1.280.0100.00325.92
8.1.270.0070.00020.33
8.1.260.0140.00028.09
8.1.250.0070.00028.09
8.1.240.0060.00320.91
8.1.230.0110.00019.67
8.1.220.0050.00317.75
8.1.210.0060.00618.77
8.1.200.0060.00317.35
8.1.190.0000.00817.22
8.1.180.0040.00418.10
8.1.170.0040.00418.72
8.1.160.0040.00420.70
8.1.150.0040.00418.92
8.1.140.0030.00519.61
8.1.130.0030.00317.69
8.1.120.0070.00017.67
8.1.110.0000.00717.51
8.1.100.0000.00817.52
8.1.90.0070.00317.65
8.1.80.0030.00517.56
8.1.70.0030.00317.52
8.1.60.0080.00017.71
8.1.50.0040.00417.58
8.1.40.0000.00817.66
8.1.30.0050.00317.71
8.1.20.0040.00417.85
8.1.10.0040.00417.76
8.1.00.0000.00917.64
8.0.300.0030.00618.77
8.0.290.0070.00016.88
8.0.280.0030.00318.38
8.0.270.0070.00017.20
8.0.260.0040.00417.20
8.0.250.0000.00617.02
8.0.240.0070.00017.08
8.0.230.0040.00416.93
8.0.220.0000.00716.99
8.0.210.0000.00816.88
8.0.200.0000.00717.06
8.0.190.0030.00617.04
8.0.180.0000.00717.04
8.0.170.0040.00417.04
8.0.160.0040.00417.09
8.0.150.0000.00716.89
8.0.140.0000.00716.93
8.0.130.0060.00013.51
8.0.120.0050.00316.86
8.0.110.0030.00616.97
8.0.100.0000.00816.96
8.0.90.0000.00717.07
8.0.80.0100.00717.04
8.0.70.0030.00516.95
8.0.60.0000.00717.04
8.0.50.0060.00316.98
8.0.30.0100.00917.13
8.0.20.0090.00917.40
8.0.10.0080.00016.94
8.0.00.0090.01316.96
7.4.330.0050.00016.85
7.4.320.0030.00316.79
7.4.300.0060.00016.80
7.4.290.0030.00316.80
7.4.280.0000.00716.71
7.4.270.0030.00316.70
7.4.260.0000.00716.78
7.4.250.0050.00216.79
7.4.240.0000.00816.76
7.4.230.0050.00216.61
7.4.220.0090.00916.77
7.4.210.0040.01216.76
7.4.200.0040.00416.79
7.4.160.0040.01116.79
7.4.150.0120.00617.40
7.4.140.0050.01417.86
7.4.130.0140.00416.61
7.4.120.0050.01216.64
7.4.110.0150.00916.72
7.4.100.0060.01416.59
7.4.90.0150.00316.96
7.4.80.0100.01319.39
7.4.70.0000.01616.46
7.4.60.0070.00716.61
7.4.50.0090.00616.53
7.4.40.0100.00616.77
7.4.30.0070.01616.57
7.4.00.0070.00915.25
7.3.330.0000.00513.32
7.3.320.0040.00313.23
7.3.310.0000.00716.44
7.3.300.0070.00016.48
7.3.290.0060.01116.44
7.3.280.0100.00716.46
7.3.270.0100.00717.40
7.3.260.0110.01216.87
7.3.250.0090.01116.65
7.3.240.0070.01216.62
7.3.230.0080.00816.47
7.3.210.0160.00016.82
7.3.200.0100.00516.73
7.3.190.0130.00216.42
7.3.180.0150.00616.90
7.3.170.0090.01216.56
7.3.160.0030.01216.56
7.3.120.0030.01015.04
7.3.110.0060.01314.98
7.3.100.0040.01115.18
7.3.90.0090.00614.86
7.3.80.0080.00814.88
7.3.70.0080.00514.90
7.3.60.0000.01214.79
7.3.50.0030.01314.91
7.3.40.0030.01214.68
7.3.30.0000.01614.79
7.3.20.0100.00316.71
7.3.10.0100.00416.75
7.3.00.0090.00916.78
7.2.330.0120.00616.84
7.2.320.0100.01016.84
7.2.310.0090.00616.83
7.2.300.0080.00816.86
7.2.290.0130.00616.83
7.2.250.0000.01915.05
7.2.240.0110.01115.28
7.2.230.0070.00715.13
7.2.220.0030.01315.26
7.2.210.0130.00315.28
7.2.200.0090.00615.25
7.2.190.0030.01315.27
7.2.180.0000.01714.94
7.2.170.0100.00615.11
7.2.130.0130.01316.97
7.2.120.0030.01716.84
7.2.110.0180.00516.79
7.2.100.0120.00417.03
7.2.90.0070.01016.78
7.2.80.0140.00217.10
7.2.70.0150.00716.60
7.2.60.0130.00716.70
7.2.50.0150.00617.05
7.2.40.0250.00017.06
7.2.30.0050.01316.86
7.2.20.0070.00716.90
7.2.10.0100.00516.93
7.2.00.0060.00618.33
7.1.330.0070.00716.16
7.1.320.0080.00816.16
7.1.310.0030.01415.96
7.1.300.0030.00715.97
7.1.290.0100.00615.91
7.1.280.0040.01116.03
7.1.270.0130.00016.05
7.1.260.0030.01015.87
7.1.250.0060.01315.97
7.1.100.0000.01117.89
7.1.70.0040.00417.50
7.1.60.0070.01719.52
7.1.50.0130.01317.19
7.1.00.0030.07322.29
7.0.200.0030.00616.75
7.0.60.0070.08319.95
7.0.50.0030.04317.85
7.0.40.0030.08720.42
7.0.30.0170.04320.02
7.0.20.0370.08020.05
7.0.10.0070.08720.18
7.0.00.0030.06019.97
5.6.280.0000.03721.10
5.6.210.0130.07020.51
5.6.200.0070.06318.19
5.6.190.0130.03320.60
5.6.180.0230.05320.27
5.6.170.0230.05320.54
5.6.160.0030.05320.50
5.6.150.0070.07718.14
5.6.140.0030.07018.07
5.6.130.0130.08018.15
5.6.120.0070.04320.98
5.6.110.0030.06021.13
5.6.100.0130.06321.00
5.6.90.0170.07320.99
5.6.80.0170.07020.50
5.5.350.0170.04320.41
5.5.340.0130.04317.99
5.5.330.0070.04020.57
5.5.320.0370.07320.29
5.5.310.0130.05320.20
5.5.300.0100.07717.98
5.5.290.0030.04018.01
5.5.280.0070.04020.68
5.5.270.0000.04720.88
5.5.260.0030.04720.76
5.5.250.0100.07020.68
5.5.240.3900.04020.15

preferences:
52.46 ms | 400 KiB | 5 Q