3v4l.org

run code in 300+ PHP versions simultaneously
<?php $strings = array('\s', '\n\t', "abc", 'abc\\\\foo'); foreach ($strings as $str) { $stripped = stripcslashes($str); $rebuilt = addcslashes($stripped, '\\'); var_dump($str, $str === $rebuilt, $rebuilt); }

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.00918.18
8.3.50.0090.00618.34
8.3.40.0070.00718.57
8.3.30.0120.00318.36
8.3.20.0070.00018.95
8.3.10.0040.00420.90
8.3.00.0080.00023.48
8.2.180.0100.00716.50
8.2.170.0070.00722.96
8.2.160.0100.01020.01
8.2.150.0040.00424.18
8.2.140.0070.00024.66
8.2.130.0040.00419.76
8.2.120.0040.00426.35
8.2.110.0090.00021.04
8.2.100.0040.00817.78
8.2.90.0090.00019.05
8.2.80.0060.00317.97
8.2.70.0080.00018.03
8.2.60.0040.00418.03
8.2.50.0050.00318.10
8.2.40.0070.00219.21
8.2.30.0040.00419.31
8.2.20.0080.00018.10
8.2.10.0030.00618.15
8.2.00.0040.00419.50
8.1.280.0150.00025.92
8.1.270.0080.00021.94
8.1.260.0030.00526.35
8.1.250.0040.00428.09
8.1.240.0040.00421.15
8.1.230.0060.00617.64
8.1.220.0080.00017.79
8.1.210.0060.00318.77
8.1.200.0030.00517.35
8.1.190.0090.00016.99
8.1.180.0040.00418.10
8.1.170.0020.00518.61
8.1.160.0030.00518.93
8.1.150.0000.00718.76
8.1.140.0040.00417.63
8.1.130.0000.00719.08
8.1.120.0000.00717.49
8.1.110.0040.00417.43
8.1.100.0040.00417.47
8.1.90.0030.00517.43
8.1.80.0070.00017.45
8.1.70.0070.00017.50
8.1.60.0040.00717.50
8.1.50.0000.00817.49
8.1.40.0030.00617.42
8.1.30.0000.00717.52
8.1.20.0040.00417.54
8.1.10.0000.00717.50
8.1.00.0040.00417.39
8.0.300.0000.00718.77
8.0.290.0100.00016.63
8.0.280.0030.00318.37
8.0.270.0000.00617.17
8.0.260.0030.00317.14
8.0.250.0000.00816.84
8.0.240.0030.00316.94
8.0.230.0000.00716.91
8.0.220.0000.00716.87
8.0.210.0030.00316.88
8.0.200.0000.00616.93
8.0.190.0040.00416.96
8.0.180.0070.00016.88
8.0.170.0000.00816.79
8.0.160.0000.00716.79
8.0.150.0080.00316.88
8.0.140.0000.00816.86
8.0.130.0000.00613.31
8.0.120.0040.00416.82
8.0.110.0040.00416.73
8.0.100.0040.00416.71
8.0.90.0070.00016.84
8.0.80.0080.01116.84
8.0.70.0050.00316.83
8.0.60.0030.00616.84
8.0.50.0040.00416.90
8.0.30.0080.01017.01
8.0.20.0110.00717.40
8.0.10.0050.00317.08
8.0.00.0090.01016.99
7.4.330.0000.00515.55
7.4.320.0060.00016.55
7.4.300.0040.00416.55
7.4.290.0050.00216.51
7.4.280.0030.00616.50
7.4.270.0040.00416.57
7.4.260.0030.00316.41
7.4.250.0040.00416.55
7.4.240.0000.00816.61
7.4.230.0000.00716.34
7.4.220.0060.00316.25
7.4.210.0110.00616.57
7.4.200.0000.00716.59
7.4.160.0080.00816.46
7.4.140.0140.01117.86
7.4.130.0040.01416.20
7.4.120.0130.01016.50
7.4.110.0080.01216.26
7.4.100.0150.00716.52
7.4.90.0000.01816.55
7.4.80.0130.00919.39
7.4.70.0000.01916.62
7.4.60.0130.00716.38
7.4.50.0030.01316.45
7.4.40.0090.00916.62
7.4.00.0070.00914.96
7.3.330.0040.00413.09
7.3.320.0030.00313.08
7.3.310.0000.00716.20
7.3.300.0030.00316.31
7.3.290.0030.00316.34
7.3.280.0090.00616.31
7.3.260.0080.00916.38
7.3.240.0090.00916.44
7.3.230.0100.00716.51
7.3.210.0100.00916.50
7.3.200.0040.01216.45
7.3.190.0030.01316.34
7.3.180.0120.00316.40
7.3.170.0100.01016.38
7.3.160.0030.01316.59
7.3.120.0070.01314.55
7.3.110.0100.00714.75
7.3.100.0030.00614.84
7.3.90.0060.01014.82
7.3.80.0070.00714.75
7.3.70.0040.01215.00
7.3.60.0080.00414.83
7.3.50.0060.00714.68
7.3.40.0070.00315.00
7.3.30.0040.01214.84
7.3.20.0040.01116.73
7.3.10.0060.00916.69
7.3.00.0030.00616.48
7.2.330.0060.02016.75
7.2.320.0100.01316.59
7.2.310.0130.01016.75
7.2.300.0070.01016.50
7.2.290.0030.01416.50
7.2.250.0000.01614.71
7.2.240.0070.01014.89
7.2.230.0090.00315.13
7.2.220.0060.01215.32
7.2.210.0000.01615.21
7.2.200.0060.00314.86
7.2.190.0030.01015.11
7.2.180.0070.00715.08
7.2.170.0090.00614.71
7.2.80.0060.00616.52
7.2.60.0170.00815.21
7.2.50.0190.00614.91
7.2.40.0240.00515.29
7.2.30.0220.00515.12
7.2.20.0170.01314.96
7.2.10.0160.01015.20
7.2.00.0150.00915.00
7.1.330.0040.00815.75
7.1.320.0110.00015.82
7.1.310.0030.01015.88
7.1.300.0030.01015.75
7.1.290.0070.00315.85
7.1.280.0000.00815.84
7.1.270.0030.01015.95
7.1.260.0000.01415.97
7.1.200.0050.00515.70
7.1.170.0240.00013.70
7.1.160.0190.00513.83
7.1.150.0170.00614.06
7.1.140.0160.01213.78
7.1.130.0230.00014.20
7.1.120.0210.00313.75
7.1.110.0180.00914.06
7.1.100.0190.00614.13
7.1.90.0130.00913.60
7.1.80.0190.00313.79
7.1.70.0170.00713.94
7.1.60.0530.01031.98
7.1.50.0350.01231.81
7.1.40.0360.01131.77
7.1.30.0470.00732.02
7.1.20.1260.01331.87
7.1.10.0190.00613.86
7.1.00.0170.00613.74

preferences:
43.09 ms | 400 KiB | 5 Q