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 = 'jackjohnson@gmail.com'; 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.70.0070.00716.88
8.3.60.0180.00418.43
8.3.50.0100.00921.34
8.3.40.0090.00618.69
8.3.30.0100.00719.00
8.3.20.0070.00020.29
8.3.10.0040.00423.51
8.3.00.0040.00419.38
8.2.180.0110.01116.50
8.2.170.0040.01122.96
8.2.160.0100.00320.43
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0210.00326.16
8.2.120.0040.00422.16
8.2.110.0060.00322.18
8.2.100.0120.00019.70
8.2.90.0030.00619.22
8.2.80.0030.00617.97
8.2.70.0050.00317.75
8.2.60.0040.00417.93
8.2.50.0090.00018.07
8.2.40.0000.00820.07
8.2.30.0000.00818.15
8.2.20.0040.00417.88
8.2.10.0040.00418.22
8.2.00.0040.00417.97
8.1.280.0170.00325.92
8.1.270.0030.00723.85
8.1.260.0000.01026.35
8.1.250.0050.00328.09
8.1.240.0000.00823.84
8.1.230.0090.00319.05
8.1.220.0040.00417.76
8.1.210.0060.00318.77
8.1.200.0030.00617.48
8.1.190.0030.00617.35
8.1.180.0060.00318.10
8.1.170.0040.00418.75
8.1.160.0040.00421.97
8.1.150.0050.00218.79
8.1.140.0000.00717.66
8.1.130.0070.00017.78
8.1.120.0000.00717.64
8.1.110.0040.00417.64
8.1.100.0030.00517.68
8.1.90.0000.00717.64
8.1.80.0000.00717.67
8.1.70.0000.00717.56
8.1.60.0030.00517.74
8.1.50.0030.00617.76
8.1.40.0040.00417.56
8.1.30.0040.00417.82
8.1.20.0040.00417.79
8.1.10.0030.00617.58
8.1.00.0050.00317.62
8.0.300.0000.00718.77
8.0.290.0070.00016.88
8.0.280.0030.00318.48
8.0.270.0000.00717.21
8.0.260.0000.00617.30
8.0.250.0000.00717.17
8.0.240.0030.00617.12
8.0.230.0000.00717.13
8.0.220.0030.00317.06
8.0.210.0070.00017.04
8.0.200.0060.00017.10
8.0.190.0000.00817.16
8.0.180.0000.00717.09
8.0.170.0030.00617.07
8.0.160.0040.00417.09
8.0.150.0030.00516.85
8.0.140.0030.00517.01
8.0.130.0000.00613.43
8.0.120.0000.00717.01
8.0.110.0040.00416.98
8.0.100.0000.00716.96
8.0.90.0040.00416.93
8.0.80.0150.00617.04
8.0.70.0040.00416.99
8.0.60.0050.00216.88
8.0.50.0060.00316.94
8.0.30.0140.00617.25
8.0.20.0100.01017.40
8.0.10.0040.00417.12
8.0.00.0080.00916.95
7.4.330.0020.00215.00
7.4.320.0060.00016.80
7.4.300.0040.00416.75
7.4.290.0030.00316.74
7.4.280.0040.00416.67
7.4.270.0070.00016.86
7.4.260.0030.00316.81
7.4.250.0000.00716.80
7.4.240.0030.00316.71
7.4.230.0050.00216.92
7.4.220.0060.01216.93
7.4.210.0070.00716.71
7.4.200.0040.00416.90
7.4.160.0060.00916.69
7.4.150.0090.00917.40
7.4.140.0060.01217.86
7.4.130.0060.01116.68
7.4.120.0130.00516.62
7.4.110.0150.00616.71
7.4.100.0050.01616.77
7.4.90.0040.01216.56
7.4.80.0110.01119.39
7.4.70.0090.01316.51
7.4.60.0100.01316.64
7.4.50.0040.00416.48
7.4.40.0060.01016.62
7.4.30.0120.00916.72
7.4.00.0080.00814.92
7.3.330.0040.00313.21
7.3.320.0030.00313.27
7.3.310.0040.00416.55
7.3.300.0000.00716.34
7.3.290.0160.00016.46
7.3.280.0060.00916.47
7.3.270.0130.00717.40
7.3.260.0030.01416.49
7.3.250.0080.00816.60
7.3.240.0140.00916.45
7.3.230.0030.01316.74
7.3.210.0040.01716.76
7.3.200.0110.01119.39
7.3.190.0130.00316.64
7.3.180.0100.00716.54
7.3.170.0130.00316.50
7.3.160.0060.01516.66
7.2.330.0100.01016.84
7.2.320.0090.00916.88
7.2.310.0100.00617.02
7.2.300.0070.01316.85
7.2.290.0040.01416.77
7.2.00.0060.00619.58
7.1.100.0050.00818.30
7.1.70.0000.00817.37
7.1.60.0120.01219.32
7.1.50.0070.01317.09
7.1.00.0030.07322.45
7.0.200.0060.00316.81
7.0.140.0100.06321.98
7.0.60.0100.08020.02
7.0.50.0100.04017.84
7.0.40.0000.09319.92
7.0.30.0200.04320.06
7.0.20.0330.06020.22
7.0.10.0030.04720.12
7.0.00.0030.04720.13
5.6.280.0000.07721.10
5.6.210.0100.07720.44
5.6.200.0070.07018.21
5.6.190.0030.08720.45
5.6.180.0100.04320.60
5.6.170.0330.05720.49
5.6.160.0000.04720.49
5.6.150.0030.05018.21
5.6.140.0070.04018.14
5.6.130.0070.04318.06
5.6.120.0070.04021.10
5.6.110.0030.07320.95
5.6.100.0130.06321.08
5.6.90.0070.07320.96
5.6.80.0070.05320.41
5.5.350.0330.06020.42
5.5.340.0070.07017.92
5.5.330.0030.06020.46
5.5.320.0330.04020.20
5.5.310.0270.05720.32
5.5.300.0030.03717.95
5.5.290.0000.04717.91
5.5.280.0100.08320.77
5.5.270.0100.08320.78
5.5.260.0100.07720.64
5.5.250.0170.07320.54
5.5.240.0270.03720.23
5.4.450.0900.04719.48
5.4.440.0930.06319.47
5.4.430.1100.06019.59
5.4.420.0630.00019.42
5.4.410.0630.00019.34
5.4.400.0600.00019.04
5.4.390.0630.00019.00
5.4.380.0630.00019.16
5.4.370.0670.00019.06
5.4.360.0600.00019.13
5.4.350.0730.00019.07
5.4.340.0090.03611.97
5.4.320.0080.03412.46
5.4.310.0070.03712.45
5.4.300.0080.03512.46
5.4.290.0080.03712.45
5.4.280.0070.04012.35
5.4.270.0090.04012.35
5.4.260.0080.04112.35
5.4.250.0070.03812.35
5.4.240.0070.03712.35
5.4.230.0050.03812.34
5.4.220.0050.03712.34
5.4.210.0050.03612.34
5.4.200.0070.03712.34
5.4.190.0100.03812.34
5.4.180.0100.03512.34
5.4.170.0080.05812.35
5.4.160.0070.03712.34
5.4.150.0060.03812.34
5.4.140.0070.04112.03
5.4.130.0130.03812.01
5.4.120.0100.04011.97
5.4.110.0070.03811.96
5.4.100.0110.04011.96
5.4.90.0070.04811.97
5.4.80.0070.05111.97
5.4.70.0080.04411.96
5.4.60.0060.04011.96
5.4.50.0080.04611.96
5.4.40.0070.04111.95
5.4.30.0030.03811.95
5.4.20.0110.03111.95
5.4.10.0060.03911.95
5.4.00.0050.03811.44
5.3.290.0070.04412.80
5.3.280.0080.04612.71
5.3.270.0080.04312.73
5.3.260.0060.04212.72
5.3.250.0080.04612.72
5.3.240.0090.04112.72
5.3.230.0090.03712.71
5.3.220.0110.04712.68
5.3.210.0060.04012.68
5.3.200.0050.03812.68
5.3.190.0090.03612.67
5.3.180.0090.03812.68
5.3.170.0060.03912.67
5.3.160.0070.03612.67
5.3.150.0050.03912.67
5.3.140.0070.04112.66
5.3.130.0070.04712.66
5.3.120.0090.04112.65
5.3.110.0060.04012.66
5.3.100.0080.03612.11
5.3.90.0050.03812.08
5.3.80.0080.03512.08
5.3.70.0040.04012.07
5.3.60.0090.03612.07
5.3.50.0050.03812.00
5.3.40.0050.03812.00
5.3.30.0040.03911.96
5.3.20.0080.03911.73
5.3.10.0060.03711.70
5.3.00.0080.03711.69
5.2.170.0020.0359.19
5.2.160.0060.0329.19
5.2.150.0130.0439.19
5.2.140.0070.0359.19
5.2.130.0080.0299.14
5.2.120.0070.0349.15
5.2.110.0050.0399.15
5.2.100.0060.0289.15
5.2.90.0060.0299.15
5.2.80.0060.0299.15
5.2.70.0040.0319.15
5.2.60.0060.0309.10
5.2.50.0100.0329.07
5.2.40.0040.0329.05
5.2.30.0070.0349.03
5.2.20.0050.0289.02
5.2.10.0070.0298.92
5.2.00.0080.0348.78
5.1.60.0010.0318.06
5.1.50.0010.0288.06
5.1.40.0050.0288.04
5.1.30.0050.0278.39
5.1.20.0050.0268.41
5.1.10.0060.0278.14
5.1.00.0090.0328.14
5.0.50.0020.0236.61
5.0.40.0060.0226.48
5.0.30.0030.0356.29
5.0.20.0030.0206.26
5.0.10.0030.0206.24
5.0.00.0050.0316.23
4.4.90.0050.0204.77
4.4.80.0020.0184.76
4.4.70.0000.0224.75
4.4.60.0060.0124.76
4.4.50.0040.0174.77
4.4.40.0020.0294.71
4.4.30.0010.0174.76
4.4.20.0010.0174.85
4.4.10.0020.0164.85
4.4.00.0020.0264.76
4.3.110.0090.0304.67
4.3.100.0050.0134.66
4.3.90.0040.0134.64
4.3.80.0040.0234.59
4.3.70.0050.0134.63
4.3.60.0030.0164.63
4.3.50.0050.0254.63
4.3.40.0060.0304.54
4.3.30.0020.0213.29
4.3.20.0020.0163.26
4.3.10.0030.0173.22
4.3.00.0130.0237.21

preferences:
42.43 ms | 401 KiB | 5 Q