3v4l.org

run code in 300+ PHP versions simultaneously
<?php $inputs = ["zbcwgmbpijcxu\"yins\"sfxn"]; $sum = 0; echo addslashes($inputs[0]); for($i = 0; $i<count($inputs); $i++){ $ns = addslashes($inputs[$i]); $matches = null; preg_match("/\\\\[^\\\"]/",$ns,$matches); $sum+=2; for($j = 0; $j<strlen($ns); $j++){ $sum++; //echo $ns[$j]; } if(count($matches)>0){ $sum+=2; } for($j=0; $j<strlen($ns); $j++){ if($ns[$j] === "\\" && $ns[$j+1] ==="\\"){ $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.0040.01116.85
8.3.50.0120.00622.24
8.3.40.0040.01118.91
8.3.30.0090.00618.90
8.3.20.0020.00520.20
8.3.10.0050.00323.64
8.3.00.0050.00320.04
8.2.180.0120.00318.41
8.2.170.0120.00322.96
8.2.160.0100.00720.18
8.2.150.0030.00624.18
8.2.140.0040.00424.66
8.2.130.0030.00619.22
8.2.120.0080.00026.35
8.2.110.0030.00622.31
8.2.100.0040.00818.04
8.2.90.0050.00319.26
8.2.80.0000.00818.04
8.2.70.0040.00417.75
8.2.60.0080.00018.05
8.2.50.0040.00418.07
8.2.40.0050.00322.23
8.2.30.0000.00720.55
8.2.20.0000.00917.82
8.2.10.0040.00418.21
8.2.00.0070.00018.07
8.1.280.0140.00725.92
8.1.270.0040.00420.23
8.1.260.0080.00028.09
8.1.250.0080.00028.09
8.1.240.0040.00423.92
8.1.230.0100.00019.07
8.1.220.0050.00317.74
8.1.210.0000.00818.77
8.1.200.0000.00917.48
8.1.190.0000.00817.48
8.1.180.0080.00018.10
8.1.170.0040.00418.77
8.1.160.0000.00720.72
8.1.150.0000.00718.90
8.1.140.0030.00519.60
8.1.130.0000.00717.63
8.1.120.0050.00317.51
8.1.110.0040.00417.52
8.1.100.0030.00517.66
8.1.90.0060.00317.63
8.1.80.0040.00417.63
8.1.70.0030.00317.50
8.1.60.0090.00317.76
8.1.50.0000.00817.68
8.1.40.0050.00317.63
8.1.30.0080.00017.77
8.1.20.0030.00617.79
8.1.10.0000.00817.68
8.1.00.0040.00417.59
8.0.300.0000.00718.77
8.0.290.0030.00616.75
8.0.280.0060.00318.35
8.0.270.0000.00717.35
8.0.260.0030.00317.31
8.0.250.0040.00417.09
8.0.240.0040.00417.05
8.0.230.0000.00717.05
8.0.220.0030.00317.06
8.0.210.0000.00817.01
8.0.200.0060.00017.12
8.0.190.0110.00017.16
8.0.180.0040.00416.94
8.0.170.0080.00016.98
8.0.160.0030.00517.10
8.0.150.0040.00416.96
8.0.140.0030.00517.00
8.0.130.0000.00713.46
8.0.120.0000.00816.93
8.0.110.0000.00717.03
8.0.100.0040.00417.02
8.0.90.0080.00017.04
8.0.80.0140.00717.01
8.0.70.0040.00416.87
8.0.60.0000.00817.02
8.0.50.0030.00517.06
8.0.30.0080.00917.35
8.0.20.0070.01217.44
8.0.10.0050.00317.10
8.0.00.0140.00617.12
7.4.330.0000.00616.76
7.4.320.0030.00316.72
7.4.300.0070.00016.69
7.4.290.0030.00316.79
7.4.280.0000.00816.80
7.4.270.0030.00316.57
7.4.260.0040.00416.68
7.4.250.0080.00016.77
7.4.240.0020.00616.73
7.4.230.0000.00816.79
7.4.220.0160.01016.84
7.4.210.0040.01116.86
7.4.200.0040.00416.65
7.4.160.0030.01316.71
7.4.150.0120.00617.40
7.4.140.0110.00917.86
7.4.130.0120.00516.76
7.4.120.0140.01016.78
7.4.110.0090.00916.66
7.4.100.0120.00616.79
7.4.90.0070.01116.65
7.4.80.0090.01519.39
7.4.70.0140.00416.59
7.4.60.0070.01016.62
7.4.50.0030.01316.61
7.4.40.0050.01716.66
7.4.30.0150.00316.69
7.4.10.0060.01315.10
7.4.00.0100.00615.21
7.3.330.0000.00513.39
7.3.320.0070.00013.31
7.3.310.0050.00216.54
7.3.300.0030.00316.46
7.3.290.0090.00916.45
7.3.280.0110.00716.49
7.3.270.0090.01017.40
7.3.260.0110.00716.51
7.3.250.0120.00816.61
7.3.240.0050.01216.62
7.3.230.0140.00316.56
7.3.210.0030.01316.63
7.3.200.0100.01016.47
7.3.190.0160.00516.50
7.3.180.0090.00616.61
7.3.170.0070.01416.83
7.3.160.0080.00916.41
7.3.130.0090.00915.16
7.3.120.0110.00614.72
7.3.110.0120.00614.71
7.3.100.0030.01014.95
7.3.90.0030.01214.89
7.3.80.0060.00314.83
7.3.70.0100.00315.09
7.3.60.0070.00715.09
7.3.50.0130.00314.88
7.3.40.0030.00914.88
7.3.30.0060.01015.06
7.3.20.0090.00316.87
7.3.10.0060.00916.85
7.3.00.0030.01016.98
7.2.330.0070.01016.84
7.2.320.0130.00317.05
7.2.310.0070.01016.69
7.2.300.0110.01116.80
7.2.290.0160.00016.74
7.2.260.0190.00315.34
7.2.250.0090.00915.41
7.2.240.0090.00615.25
7.2.230.0030.01415.29
7.2.220.0100.00615.30
7.2.210.0030.01015.29
7.2.200.0000.00915.17
7.2.190.0000.01115.13
7.2.180.0030.00714.99
7.2.170.0000.01215.36
7.2.160.0030.00615.20
7.2.150.0130.00717.03
7.2.140.0030.01617.05
7.2.130.0030.00817.16
7.2.120.0070.00717.01
7.2.110.0100.00317.05
7.2.100.0070.00316.89
7.2.90.0040.00817.05
7.2.80.0070.00317.11
7.2.70.0090.00917.33
7.2.60.0080.00417.05
7.2.50.0100.00317.00
7.2.40.0040.01117.00
7.2.30.0100.00317.01
7.2.20.0030.01017.12
7.2.10.0030.01117.16
7.2.00.0070.00718.25
7.1.330.0040.01215.77
7.1.320.0040.01116.08
7.1.310.0090.00416.03
7.1.300.0060.00916.02
7.1.290.0040.00415.72
7.1.280.0070.00715.96
7.1.270.0040.01115.94
7.1.260.0060.01215.84
7.1.250.0030.00516.16
7.1.240.0060.00915.95
7.1.230.0060.00615.72
7.1.220.0110.00316.00
7.1.210.0040.00816.14
7.1.200.0030.01015.73
7.1.190.0100.00316.02
7.1.180.0030.00716.11
7.1.170.0070.00716.04
7.1.160.0070.00716.01
7.1.150.0030.00615.76
7.1.140.0090.00916.07
7.1.130.0090.00916.14
7.1.120.0030.01016.08
7.1.110.0000.01516.02
7.1.100.0050.00417.22
7.1.90.0070.00715.88
7.1.80.0030.00615.90
7.1.70.0030.00816.64
7.1.60.0070.01217.80
7.1.50.0130.00716.59
7.1.40.0040.00815.76
7.1.30.0060.00316.01
7.1.20.0030.00616.13
7.1.10.0030.01015.61
7.1.00.0070.03619.04
7.0.330.0030.01015.60
7.0.320.0000.01315.84
7.0.310.0000.00915.33
7.0.300.0030.01015.50
7.0.290.0000.00815.42
7.0.280.0000.01215.63
7.0.270.0100.00715.41
7.0.260.0070.00715.63
7.0.250.0140.00015.65
7.0.240.0080.00415.54
7.0.230.0040.00415.78
7.0.220.0030.01015.80
7.0.210.0000.01415.52
7.0.200.0100.01016.11
7.0.190.0030.00915.51
7.0.180.0070.00715.63
7.0.170.0030.00915.67
7.0.160.0040.00715.67
7.0.150.0000.01115.44
7.0.140.0080.00615.61
7.0.130.0030.00815.71
7.0.120.0030.00615.56
7.0.110.0040.00415.64
7.0.100.0030.01415.80
7.0.90.0110.00415.70
7.0.80.0040.00815.39
7.0.70.0060.00615.34
7.0.60.0050.04517.79
7.0.50.0070.03916.66
7.0.40.0100.02516.89
7.0.30.0130.03016.91
7.0.20.0160.02116.88
7.0.10.0020.04616.87
7.0.00.0030.02817.01
5.6.400.0100.00914.77
5.6.390.0140.00014.11
5.6.380.0000.01214.54
5.6.370.0070.00414.44
5.6.360.0070.00714.40
5.6.350.0040.00714.55
5.6.340.0050.00514.82
5.6.330.0000.01814.41
5.6.320.0000.01414.96
5.6.310.0060.00614.51
5.6.300.0000.00914.56
5.6.290.0040.00414.87
5.6.280.0040.02118.02
5.6.270.0060.00314.50
5.6.260.0000.01714.69
5.6.250.0000.01714.43
5.6.240.0040.01214.52
5.6.230.0080.00414.41
5.6.220.0040.01414.50
5.6.210.0040.02417.46
5.6.200.0050.04216.32
5.6.190.0120.04317.48
5.6.180.0170.02717.40
5.6.170.0130.02617.42
5.6.160.0020.04717.32
5.6.150.0080.04516.26
5.6.140.0030.03716.24
5.6.130.0000.03116.20
5.6.120.0050.02317.65
5.6.110.0110.04117.79
5.6.100.0050.04217.64
5.6.90.0100.03817.79
5.6.80.0040.02717.54
5.6.70.0000.01614.36
5.6.60.0040.00814.41
5.6.50.0040.01114.44
5.6.40.0060.00614.68
5.6.30.0110.00314.34
5.6.20.0000.01114.70
5.6.10.0040.01114.40
5.6.00.0050.00514.36
5.5.380.0060.00614.31
5.5.370.0040.01114.29
5.5.360.0100.00314.42
5.5.350.0200.02717.50
5.5.340.0050.03216.26
5.5.330.0050.05017.50
5.5.320.0270.02817.51
5.5.310.0150.03217.48
5.5.300.0050.02916.15
5.5.290.0100.04116.20
5.5.280.0070.04717.58
5.5.270.0080.03117.69
5.5.260.0050.04517.62
5.5.250.0050.04717.46
5.5.240.2210.01817.45
5.5.230.0130.00314.28
5.5.220.0030.01214.53
5.5.210.0000.01114.15
5.5.200.0060.00614.52
5.5.190.0060.00614.26
5.5.180.0070.01014.48
5.5.170.0060.00614.20
5.5.160.0160.00014.58
5.5.150.0090.00314.30
5.5.140.0030.00614.11
5.5.130.0000.01214.30
5.5.120.0030.01014.04
5.5.110.0080.00814.41
5.5.100.0070.00714.09
5.5.90.0040.00714.16
5.5.80.0070.00414.46
5.5.70.0040.00814.27
5.5.60.0070.00714.30
5.5.50.0030.01014.42
5.5.40.0090.00314.38
5.5.30.0030.01414.25
5.5.20.0030.00614.55
5.5.10.0090.00014.00
5.5.00.0060.00814.31

preferences:
46.75 ms | 401 KiB | 5 Q