3v4l.org

run code in 300+ PHP versions simultaneously
<?php $_email_pattern = '#[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,6}#i'; $author = ''; $author_email = 'jack johnson'; if ((empty($author)) && (!empty($author_email))) { $_try_author = $author_email; if (strpos($_try_author, '@') !== false) { $_try_author = trim(preg_replace($_email_pattern, '', $_try_author)); $_try_author = trim(preg_replace('#[<()>\[\]._%+-]#',' ',$_try_author)); } else { $author_email = ''; // not a valid email } $author = $_try_author; } echo 'AUTHOR: '.$author."\n"; echo 'AUTHOR EMAIL: '.$author_email."\n";

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.0120.00318.30
8.3.50.0120.00821.27
8.3.40.0150.00318.76
8.3.30.0120.00318.96
8.3.20.0040.00420.46
8.3.10.0060.00323.61
8.3.00.0080.00019.13
8.2.180.0140.00718.29
8.2.170.0090.00922.96
8.2.160.0080.00818.87
8.2.150.0060.00324.18
8.2.140.0050.00324.66
8.2.130.0060.00926.16
8.2.120.0070.00022.18
8.2.110.0070.00322.07
8.2.100.0040.00717.91
8.2.90.0000.00819.08
8.2.80.0050.00317.97
8.2.70.0000.00817.50
8.2.60.0000.00817.93
8.2.50.0030.00618.07
8.2.40.0040.00419.88
8.2.30.0000.00718.09
8.2.20.0040.00417.66
8.2.10.0040.00418.16
8.2.00.0070.00017.77
8.1.280.0070.00725.92
8.1.270.0060.00323.79
8.1.260.0080.00426.35
8.1.250.0040.00428.09
8.1.240.0070.00324.02
8.1.230.0090.00319.10
8.1.220.0090.00017.77
8.1.210.0040.00418.77
8.1.200.0060.00317.22
8.1.190.0050.00317.22
8.1.180.0000.00718.10
8.1.170.0030.00618.50
8.1.160.0050.00321.93
8.1.150.0050.00218.88
8.1.140.0070.00017.34
8.1.130.0040.00417.72
8.1.120.0000.00817.49
8.1.110.0000.00817.54
8.1.100.0030.00517.48
8.1.90.0050.00317.45
8.1.80.0040.00417.50
8.1.70.0030.00517.36
8.1.60.0030.00517.61
8.1.50.0030.00617.51
8.1.40.0040.00417.58
8.1.30.0000.00817.58
8.1.20.0040.00417.61
8.1.10.0040.00417.55
8.1.00.0000.00717.48
8.0.300.0000.00718.77
8.0.290.0000.00816.75
8.0.280.0000.00718.46
8.0.270.0030.00317.27
8.0.260.0030.00317.33
8.0.250.0000.00717.02
8.0.240.0040.00416.96
8.0.230.0070.00016.99
8.0.220.0080.00016.83
8.0.210.0000.00716.80
8.0.200.0030.00316.96
8.0.190.0000.00817.04
8.0.180.0070.00016.88
8.0.170.0050.00316.89
8.0.160.0030.00316.79
8.0.150.0050.00216.88
8.0.140.0050.00316.76
8.0.130.0050.00013.36
8.0.120.0020.00516.79
8.0.110.0000.00816.85
8.0.100.0070.00016.86
8.0.90.0040.00416.81
8.0.80.0060.01516.88
8.0.70.0020.00516.79
8.0.60.0050.00216.95
8.0.50.0070.00016.79
8.0.30.0160.00617.14
8.0.20.0060.01217.40
8.0.10.0000.00716.89
8.0.00.0080.01116.71
7.4.330.0030.00315.00
7.4.320.0030.00316.50
7.4.300.0030.00316.41
7.4.290.0030.00316.61
7.4.280.0040.00416.46
7.4.270.0060.00016.66
7.4.260.0030.00616.50
7.4.250.0030.00616.63
7.4.240.0010.00616.60
7.4.230.0030.00316.47
7.4.220.0110.00616.64
7.4.210.0030.01016.49
7.4.200.0070.00016.45
7.4.160.0090.00616.57
7.4.150.0100.00717.40
7.4.140.0090.00917.86
7.4.130.0120.00516.60
7.4.120.0140.00416.43
7.4.110.0070.01016.40
7.4.100.0090.01416.67
7.4.90.0130.00316.53
7.4.80.0090.00919.39
7.4.70.0120.00916.52
7.4.60.0090.00616.55
7.4.50.0030.00516.46
7.4.40.0080.00816.58
7.4.30.0090.01216.43
7.4.00.0160.00014.73
7.3.330.0050.00013.11
7.3.320.0000.00613.25
7.3.310.0000.00716.42
7.3.300.0070.00016.25
7.3.290.0070.00716.36
7.3.280.0100.00516.39
7.3.270.0160.00017.40
7.3.260.0160.00016.57
7.3.250.0110.00516.51
7.3.240.0030.01616.33
7.3.230.0100.00716.39
7.3.210.0080.00816.40
7.3.200.0140.00619.39
7.3.190.0070.01516.31
7.3.180.0030.01216.61
7.3.170.0060.01016.52
7.3.160.0110.00416.48
7.2.330.0100.00716.74
7.2.320.0140.00316.77
7.2.310.0090.00616.39
7.2.300.0070.01416.50
7.2.290.0120.01216.72
7.2.00.0030.00919.38
7.1.100.0000.01218.00
7.1.70.0000.00817.21
7.1.60.0070.01419.32
7.1.50.0110.00716.71
7.1.00.0000.08022.33
7.0.200.0090.00916.72
7.0.140.0030.07322.01
7.0.60.0000.08019.87
7.0.50.0000.05017.89
7.0.40.0130.07320.21
7.0.30.0300.04020.21
7.0.20.0230.07720.04
7.0.10.0070.05320.14
7.0.00.0100.08020.12
5.6.280.0130.06320.92
5.6.210.0100.06020.46
5.6.200.0070.08318.20
5.6.190.0030.04720.57
5.6.180.0130.04320.61
5.6.170.0300.08020.33
5.6.160.0100.03720.33
5.6.150.0030.08718.22
5.6.140.0100.04718.22
5.6.130.0100.06018.20
5.6.120.0070.05320.93
5.6.110.0130.07721.14
5.6.100.0130.07320.98
5.6.90.0170.05721.09
5.6.80.0070.06020.38
5.5.350.0130.05720.30
5.5.340.0100.07717.96
5.5.330.0030.06320.25
5.5.320.0300.06020.21
5.5.310.0500.06020.27
5.5.300.0030.04017.89
5.5.290.0100.08017.93
5.5.280.0170.07720.76
5.5.270.0100.08320.72
5.5.260.0130.07720.86
5.5.250.0030.09020.68
5.5.240.0170.03320.15
5.4.450.0900.06319.45
5.4.440.1030.03719.54
5.4.430.0070.06019.62
5.4.420.0670.00019.32
5.4.410.0630.00019.55
5.4.400.0630.00019.22
5.4.390.0600.00019.26
5.4.380.0630.00019.00
5.4.370.0600.00018.96
5.4.360.0600.00019.20
5.4.350.0670.00018.98
5.4.340.0060.03611.97
5.4.320.0080.03612.46
5.4.310.0050.04112.45
5.4.300.0050.03912.46
5.4.290.0090.03512.45
5.4.280.0070.03612.35
5.4.270.0080.03812.35
5.4.260.0040.04012.35
5.4.250.0070.03612.35
5.4.240.0090.03312.35
5.4.230.0030.04012.34
5.4.220.0070.03612.34
5.4.210.0060.03512.34
5.4.200.0050.04012.34
5.4.190.0060.03712.34
5.4.180.0050.03812.34
5.4.170.0070.03612.35
5.4.160.0040.03812.34
5.4.150.0080.03412.34
5.4.140.0070.03812.02
5.4.130.0080.03512.01
5.4.120.0070.03911.97
5.4.110.0060.03511.96
5.4.100.0110.03311.96
5.4.90.0080.03611.96
5.4.80.0070.03811.96
5.4.70.0050.03711.96
5.4.60.0090.03411.97
5.4.50.0050.04011.96
5.4.40.0060.03711.95
5.4.30.0050.04311.95
5.4.20.0040.03711.95
5.4.10.0050.03511.95
5.4.00.0060.04711.44
5.3.290.0070.05412.80
5.3.280.0060.04412.71
5.3.270.0070.03812.73
5.3.260.0030.04212.72
5.3.250.0070.03812.72
5.3.240.0120.05112.72
5.3.230.0050.03912.71
5.3.220.0060.04812.68
5.3.210.0070.04012.68
5.3.200.0070.04012.68
5.3.190.0110.03812.68
5.3.180.0100.03912.67
5.3.170.0070.03812.67
5.3.160.0080.04012.67
5.3.150.0070.03912.68
5.3.140.0080.03512.66
5.3.130.0060.04112.66
5.3.120.0070.04012.66
5.3.110.0040.04312.66
5.3.100.0050.04112.12
5.3.90.0070.03812.08
5.3.80.0090.03912.07
5.3.70.0130.04212.07
5.3.60.0080.03612.06
5.3.50.0070.03712.00
5.3.40.0070.03712.00
5.3.30.0070.03611.94
5.3.20.0030.04011.72
5.3.10.0050.03611.69
5.3.00.0030.03911.68
5.2.170.0040.0339.17
5.2.160.0080.0279.18
5.2.150.0020.0349.18
5.2.140.0070.0289.17
5.2.130.0020.0329.14
5.2.120.0040.0309.14
5.2.110.0080.0269.14
5.2.100.0060.0279.14
5.2.90.0040.0309.14
5.2.80.0060.0289.14
5.2.70.0030.0319.13
5.2.60.0060.0289.09
5.2.50.0030.0329.05
5.2.40.0040.0299.04
5.2.30.0020.0329.01
5.2.20.0050.0289.00
5.2.10.0060.0318.92
5.2.00.0060.0328.78
5.1.60.0050.0248.07
5.1.50.0020.0268.06
5.1.40.0030.0298.04
5.1.30.0030.0268.39
5.1.20.0050.0308.41
5.1.10.0050.0278.14
5.1.00.0050.0258.14
5.0.50.0060.0196.61
5.0.40.0040.0186.47
5.0.30.0010.0426.29
5.0.20.0010.0256.26
5.0.10.0020.0216.24
5.0.00.0050.0296.23
4.4.90.0020.0224.78
4.4.80.0040.0164.76
4.4.70.0040.0144.75
4.4.60.0020.0164.75
4.4.50.0030.0144.77
4.4.40.0030.0244.71
4.4.30.0050.0144.76
4.4.20.0020.0164.84
4.4.10.0030.0154.85
4.4.00.0060.0304.75
4.3.110.0050.0214.67
4.3.100.0010.0204.67
4.3.90.0020.0154.63
4.3.80.0010.0264.58
4.3.70.0030.0144.63
4.3.60.0040.0194.63
4.3.50.0020.0174.63
4.3.40.0050.0234.53
4.3.30.0010.0173.28
4.3.20.0020.0163.26
4.3.10.0020.0163.22
4.3.00.0070.0237.21

preferences:
39.83 ms | 401 KiB | 5 Q