3v4l.org

run code in 300+ PHP versions simultaneously
<?php $not_allowed_symbols = '[^a-z0-9:;,!\'\s*.?()"-]'; $letter = nl2br("aaa\nbbb\nccc"); print_r($letter); if(preg_match("/$not_allowed_symbols/i", $letter)){ echo "There are not allowed symbols in the text"; }else{ echo "There are allowed symbols in the text"; }

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.18
8.3.50.0070.00921.09
8.3.40.0090.00618.92
8.3.30.0070.00718.94
8.3.20.0040.00420.19
8.3.10.0050.00522.12
8.3.00.0000.00820.61
8.2.180.0140.00416.63
8.2.170.0090.00622.96
8.2.160.0030.01119.08
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0080.00019.65
8.2.110.0000.00922.28
8.2.100.0070.00419.28
8.2.90.0080.00019.02
8.2.80.0040.00417.97
8.2.70.0030.00617.75
8.2.60.0000.00817.80
8.2.50.0110.00018.07
8.2.40.0040.00418.16
8.2.30.0000.00918.02
8.2.20.0050.00217.69
8.2.10.0000.00717.85
8.2.00.0030.00617.95
8.1.280.0120.00625.92
8.1.270.0040.00420.37
8.1.260.0040.00426.35
8.1.250.0030.00628.09
8.1.240.0030.00623.75
8.1.230.0050.00519.09
8.1.220.0030.00617.77
8.1.210.0050.00318.77
8.1.200.0060.00317.38
8.1.190.0000.00817.38
8.1.180.0000.00818.65
8.1.170.0050.00318.46
8.1.160.0070.00022.21
8.1.150.0000.00718.70
8.1.140.0040.00417.52
8.1.130.0000.00717.76
8.1.120.0080.00017.43
8.1.110.0060.00317.45
8.1.100.0040.00417.55
8.1.90.0070.00017.53
8.1.80.0000.00717.43
8.1.70.0040.00417.43
8.1.60.0000.00817.68
8.1.50.0040.00417.52
8.1.40.0060.00317.59
8.1.30.0020.00517.71
8.1.20.0050.00317.61
8.1.10.0030.00617.58
8.1.00.0050.00517.60
8.0.300.0040.00418.77
8.0.290.0040.00417.15
8.0.280.0000.00718.46
8.0.270.0030.00417.21
8.0.260.0030.00616.96
8.0.250.0000.00717.13
8.0.240.0030.00617.10
8.0.230.0030.00317.12
8.0.220.0000.00717.01
8.0.210.0040.00416.95
8.0.200.0000.00616.98
8.0.190.0040.00416.95
8.0.180.0070.00017.07
8.0.170.0030.00516.98
8.0.160.0040.00417.07
8.0.150.0040.00416.93
8.0.140.0070.00017.02
8.0.130.0030.00313.46
8.0.120.0080.00017.03
8.0.110.0070.00016.86
8.0.100.0040.00417.05
8.0.90.0050.00317.09
8.0.80.0130.00316.98
8.0.70.0080.00017.10
8.0.60.0030.00517.00
8.0.50.0070.00016.90
8.0.30.0130.00517.43
8.0.20.0150.01217.40
8.0.10.0040.00416.95
8.0.00.0070.01016.82
7.4.330.0000.00615.00
7.4.320.0040.00416.51
7.4.300.0000.00616.79
7.4.290.0040.00416.59
7.4.280.0080.00316.72
7.4.270.0070.00016.75
7.4.260.0060.00316.74
7.4.250.0040.00416.70
7.4.240.0020.00616.68
7.4.230.0000.00816.77
7.4.220.0060.01816.67
7.4.210.0070.01116.73
7.4.200.0040.00416.64
7.4.190.0000.00716.53
7.4.160.0040.01216.43
7.4.150.0090.00917.40
7.4.140.0080.01317.86
7.4.130.0130.00516.63
7.4.120.0090.00716.77
7.4.110.0060.01316.67
7.4.100.0110.01116.82
7.4.90.0130.01016.62
7.4.80.0090.01219.39
7.4.70.0070.01416.53
7.4.60.0140.01116.88
7.4.50.0030.00316.64
7.4.40.0090.00622.77
7.4.30.0150.00616.45
7.4.00.0060.01215.31
7.3.330.0000.00513.11
7.3.320.0000.00513.32
7.3.310.0030.00316.29
7.3.300.0000.00716.35
7.3.290.0070.00716.40
7.3.280.0070.01216.39
7.3.270.0150.00517.40
7.3.260.0090.00916.45
7.3.250.0120.00816.72
7.3.240.0070.01016.43
7.3.230.0100.00716.41
7.3.210.0030.01516.46
7.3.200.0130.00319.39
7.3.190.0030.01316.25
7.3.180.0120.00516.45
7.3.170.0140.00616.46
7.3.160.0000.01516.44
7.3.120.0040.01114.89
7.2.330.0100.00716.84
7.2.320.0150.00916.59
7.2.310.0090.01216.51
7.2.300.0100.00716.80
7.2.290.0090.00616.78
7.2.80.0090.00616.60
7.1.200.0120.00415.72
7.1.70.0000.00817.38
7.1.60.0090.01519.82
7.1.50.0070.00417.14
7.1.00.0070.06322.45
7.0.200.0030.01016.96
7.0.140.0130.06321.95
7.0.60.0100.07719.78
7.0.50.0100.07717.79
7.0.40.0130.05719.98
7.0.30.0200.04720.14
7.0.20.0230.03720.05
7.0.10.0300.08320.23
7.0.00.0130.07320.03
5.6.280.0000.07720.81
5.6.210.0030.08320.46
5.6.200.0100.07718.15
5.6.190.0070.05320.35
5.6.180.0270.07720.61
5.6.170.0230.08320.49
5.6.160.0170.07320.48
5.6.150.0070.07718.20
5.6.140.0000.04318.18
5.6.130.0130.07318.11
5.6.120.0030.04020.95
5.6.110.0030.04320.96
5.6.100.0100.04321.00
5.6.90.0100.08321.11
5.6.80.0070.04020.50
5.5.350.0070.08020.46
5.5.340.0030.08717.91
5.5.330.0170.06020.13
5.5.320.0570.06020.12
5.5.310.0170.06020.13
5.5.300.0030.08318.00
5.5.290.0170.04017.99
5.5.280.0100.07720.87
5.5.270.0000.04720.86
5.5.260.0000.08020.89
5.5.250.0000.04720.70
5.5.240.4300.03720.14
5.4.450.0630.04019.23
5.4.440.0230.05019.10
5.4.430.0570.05319.57
5.4.420.0100.05719.14
5.4.410.0230.04319.35
5.4.400.0100.05019.13
5.4.390.0130.05019.05
5.4.380.0130.05318.98
5.4.370.0100.05019.05
5.4.360.0030.06019.16
5.4.350.0080.04811.98
5.4.340.0120.05111.97
5.4.320.0050.04112.45
5.4.310.0070.03712.45
5.4.300.0060.04112.45
5.4.290.0050.03812.45
5.4.280.0100.03612.35
5.4.270.0060.03612.35
5.4.260.0050.03912.35
5.4.250.0070.05318.93
5.4.240.0170.05018.89
5.4.230.0030.05718.89
5.4.220.0130.05318.82
5.4.210.0170.04718.64
5.4.200.0100.05018.60
5.4.190.0100.06718.72
5.4.180.0100.05018.73
5.4.170.0100.05318.69
5.4.160.0130.05318.82
5.4.150.0030.06319.02
5.4.140.0100.04716.30
5.4.130.0170.05016.47
5.4.120.0070.07016.32
5.4.110.0100.07716.23
5.4.100.0030.05016.26
5.4.90.0100.04316.58
5.4.80.0130.04316.35
5.4.70.0170.04016.21
5.4.60.0030.05316.29
5.4.50.0100.04316.38
5.4.40.0000.05316.26
5.4.30.0170.04016.25
5.4.20.0070.05016.37
5.4.10.0100.06716.37
5.4.00.0000.05315.74
5.3.290.0070.04212.80
5.3.280.0200.06314.75
5.3.270.0130.07014.45
5.3.260.0030.05714.38
5.3.250.0200.03714.30
5.3.240.0130.06714.64
5.3.230.0100.05014.61
5.3.220.0070.07714.57
5.3.210.0170.06714.56
5.3.200.0170.04714.33
5.3.190.0100.04714.71
5.3.180.0070.04714.55
5.3.170.0030.05314.32
5.3.160.0070.04714.57
5.3.150.0000.05714.55
5.3.140.0070.05014.64
5.3.130.0170.04314.54
5.3.120.0070.05714.66
5.3.110.0000.06014.44
5.3.100.0100.04714.05
5.3.90.0070.05013.79
5.3.80.0030.05013.96
5.3.70.0070.05013.93
5.3.60.0100.04314.04
5.3.50.0100.04713.90
5.3.40.0070.05013.80
5.3.30.0130.04013.82
5.3.20.0130.04313.54
5.3.10.0100.07313.53
5.3.00.0200.06313.65
5.2.170.0030.04011.15
5.2.160.0070.03711.23
5.2.150.0030.05311.14
5.2.140.0030.04011.04
5.2.130.0100.03711.21
5.2.120.0100.03311.20
5.2.110.0030.04011.11
5.2.100.0070.03711.10
5.2.90.0000.04311.09
5.2.80.0070.04011.11
5.2.70.0030.04011.24
5.2.60.0000.04711.14
5.2.50.0070.04311.11
5.2.40.0030.04011.02
5.2.30.0030.04010.73
5.2.20.0170.02711.08
5.2.10.0000.04310.69
5.2.00.0070.03710.87
5.1.60.0070.0379.93
5.1.50.0030.0379.92
5.1.40.0030.03710.12
5.1.30.0070.03310.39
5.1.20.0070.05710.27
5.1.10.0070.03310.08
5.1.00.0000.04310.30
5.0.50.0030.0308.61
5.0.40.0030.0278.37
5.0.30.0030.0408.11
5.0.20.0030.0278.22
5.0.10.0030.0408.12
5.0.00.0070.0408.16
4.4.90.0030.0206.98
4.4.80.0000.0236.98
4.4.70.0130.0176.98
4.4.60.0030.0306.98
4.4.50.0070.0206.98
4.4.40.0070.0306.98
4.4.30.0030.0276.98
4.4.20.0000.0236.98
4.4.10.0030.0206.98
4.4.00.0000.0336.98
4.3.110.0000.0236.98
4.3.100.0030.0206.98
4.3.90.0000.0206.98
4.3.80.0030.0406.98
4.3.70.0000.0236.98
4.3.60.0030.0206.98
4.3.50.0030.0236.98
4.3.40.0000.0336.98
4.3.30.0000.0236.98
4.3.20.0070.0176.98
4.3.10.0030.0236.98
4.3.00.0000.02014.52

preferences:
48.15 ms | 401 KiB | 5 Q