3v4l.org

run code in 300+ PHP versions simultaneously
<?php $fieldname = "<script language='JavaScript' type='text/javascript'> <!-- var prefix = 'mailto:'; var suffix = ''; var attribs = ''; var path = 'hr' 'ef' '='; var addy22804 = 'justinleegould' '@'; addy22804 = addy22804 'gmail' '.' 'com'; document.write( '<a ' path '\'' prefix addy22804 suffix '\'' attribs '>' ); document.write( addy22804 ); document.write( '<\/a>' ); //--> </script><script language='JavaScript' type='text/javascript'> <!-- document.write( '<span style=\'display: none;\'>' ); //--> </script>This e-mail address is being protected from spambots. You need JavaScript enabled to view it <script language='JavaScript' type='text/javascript'> <!-- document.write( '</' ); document.write( 'span>' ); //--> </script>"; $start = strpos($fieldname, "var path = 'hr'"); $end = strpos($fieldname, "document.write"); $fieldname = substr($fieldname, $start, $end - $start); $fieldname = substr($fieldname, strpos($fieldname, "var", 1)); $key = substr($fieldname, 4, strpos($fieldname, "=") - 5); echo $fieldname; echo "x=" . $key; /* strrpos — Find the position of the last occurrence of a substring in a string int strrpos ( string $haystack , string $needle [, int $offset = 0 ] ) Find the numeric position of the last occurrence of needle in the haystack string. strpos — Find the position of the first occurrence of a substring in a string mixed strpos ( string $haystack , mixed $needle [, int $offset = 0 ] ) string substr ( string $string , int $start [, int $length ] ) Returns the portion of string specified by the start and length parameters. */ ?>

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.01018.18
8.3.50.0110.00621.89
8.3.40.0000.01418.84
8.3.30.0090.00919.10
8.3.20.0080.00020.14
8.3.10.0080.00023.53
8.3.00.0050.00319.38
8.2.180.0040.01116.32
8.2.170.0110.00722.96
8.2.160.0090.00920.52
8.2.150.0040.00424.18
8.2.140.0090.00324.66
8.2.130.0050.00326.16
8.2.120.0080.00022.16
8.2.110.0030.00619.41
8.2.100.0090.00317.74
8.2.90.0000.00819.23
8.2.80.0030.00617.97
8.2.70.0160.00017.00
8.2.60.0000.00818.04
8.2.50.0030.00618.07
8.2.40.0040.00419.95
8.2.30.0040.00419.84
8.2.20.0050.00317.59
8.2.10.0050.00219.84
8.2.00.0050.00317.67
8.1.280.0120.00625.92
8.1.270.0090.00623.71
8.1.260.0000.00726.35
8.1.250.0040.00428.09
8.1.240.0090.00023.84
8.1.230.0110.00022.67
8.1.220.0060.00317.74
8.1.210.0040.00418.77
8.1.200.0060.00317.35
8.1.190.0040.00417.22
8.1.180.0030.00618.10
8.1.170.0040.00418.48
8.1.160.0040.00421.92
8.1.150.0070.00318.54
8.1.140.0000.00817.41
8.1.130.0000.00817.86
8.1.120.0000.00717.41
8.1.110.0000.00717.36
8.1.100.0000.00717.43
8.1.90.0040.00417.46
8.1.80.0000.00817.44
8.1.70.0030.00317.44
8.1.60.0060.00317.59
8.1.50.0000.00817.35
8.1.40.0040.00417.44
8.1.30.0000.00817.59
8.1.20.0040.00417.66
8.1.10.0020.00517.58
8.1.00.0000.00817.45
8.0.300.0050.00220.65
8.0.290.0000.00717.18
8.0.280.0050.00318.48
8.0.270.0030.00317.21
8.0.260.0000.00617.33
8.0.250.0040.00417.01
8.0.240.0080.00016.95
8.0.230.0000.00716.97
8.0.220.0030.00316.96
8.0.210.0070.00016.79
8.0.200.0000.00716.87
8.0.190.0050.00216.98
8.0.180.0040.00416.82
8.0.170.0030.00516.94
8.0.160.0070.00016.79
8.0.150.0000.00716.81
8.0.140.0040.00416.86
8.0.130.0070.00013.37
8.0.120.0050.00316.92
8.0.110.0080.00016.82
8.0.100.0040.00416.80
8.0.90.0000.00816.75
8.0.80.0090.00916.82
8.0.70.0080.00016.77
8.0.60.0040.00416.90
8.0.50.0070.00016.66
8.0.30.0100.00917.30
8.0.20.0130.01317.40
8.0.10.0000.00716.95
8.0.00.0100.01316.88
7.4.330.0060.00015.00
7.4.320.0000.00716.40
7.4.300.0030.00316.62
7.4.290.0030.00316.55
7.4.280.0060.00316.55
7.4.270.0000.00716.43
7.4.260.0070.00016.54
7.4.250.0020.00516.55
7.4.240.0030.00316.52
7.4.230.0080.00016.52
7.4.220.0120.00816.43
7.4.210.0060.01016.51
7.4.200.0030.00316.67
7.4.190.0000.00816.33
7.4.160.0120.00416.50
7.4.150.0060.01217.40
7.4.140.0130.00617.86
7.4.130.0110.00716.43
7.4.120.0070.01116.40
7.4.110.0070.01016.57
7.4.100.0140.00316.47
7.4.90.0170.00016.67
7.4.80.0100.01319.39
7.4.70.0120.01216.51
7.4.60.0070.01416.20
7.4.50.0080.00016.46
7.4.40.0000.01716.37
7.4.30.0110.00416.36
7.4.00.0090.00814.85
7.3.330.0040.00413.18
7.3.320.0030.00313.13
7.3.310.0000.00716.29
7.3.300.0070.00016.23
7.3.290.0070.00716.34
7.3.280.0110.00716.26
7.3.270.0000.01617.40
7.3.260.0090.00916.27
7.3.250.0110.00716.33
7.3.240.0060.01616.56
7.3.230.0040.01216.39
7.3.210.0120.00616.31
7.3.200.0120.00619.39
7.3.190.0110.01116.62
7.3.180.0160.00016.30
7.3.170.0060.01316.32
7.3.160.0110.00616.24
7.3.120.0030.01114.63
7.3.110.0090.00914.65
7.3.100.0030.00514.83
7.3.90.0110.00314.81
7.3.80.0060.01014.81
7.3.70.0040.00814.94
7.3.60.0030.00614.93
7.3.50.0060.00614.70
7.3.40.0080.00014.54
7.3.30.0030.00914.51
7.3.20.0060.00316.70
7.3.10.0060.00916.64
7.3.00.0100.00416.43
7.2.330.0060.01316.44
7.2.320.0100.00616.43
7.2.310.0060.01016.51
7.2.300.0070.01116.67
7.2.290.0040.01216.61
7.2.250.0120.00615.20
7.2.240.0120.00915.08
7.2.230.0030.00615.24
7.2.220.0100.00314.81
7.2.210.0030.01414.90
7.2.200.0060.00315.15
7.2.190.0070.00814.69
7.2.180.0060.00614.82
7.2.170.0030.01014.67
7.2.130.0040.01116.74
7.2.120.0090.00616.84
7.2.110.0030.01017.02
7.2.100.0080.00817.01
7.2.90.0060.00616.98
7.2.80.0030.00716.93
7.2.70.0000.01316.71
7.2.60.0050.00916.92
7.2.50.0060.00917.05
7.2.40.0060.00616.82
7.2.30.0070.00417.09
7.2.20.0030.01016.91
7.2.10.0030.00917.07
7.2.00.0080.00518.21
7.1.330.0090.00615.93
7.1.320.0040.01115.74
7.1.310.0030.00916.00
7.1.300.0060.00615.81
7.1.290.0090.00615.52
7.1.280.0030.00615.82
7.1.270.0040.00815.91
7.1.260.0030.01015.78
7.1.250.0090.00315.53
7.1.200.0030.00915.75
7.1.100.0090.00318.12
7.1.70.0030.01017.23
7.1.60.0120.01219.46
7.1.50.0100.00716.96
7.1.00.0000.07722.30
7.0.200.0290.00314.70
7.0.140.0030.07322.21
7.0.60.0200.05719.93
7.0.50.0030.04017.83
7.0.40.0000.09020.04
7.0.30.0230.03720.11
7.0.20.0270.03720.18
7.0.10.0100.07320.17
7.0.00.0030.04320.16
5.6.280.0070.07321.14
5.6.210.0070.04320.52
5.6.200.0100.07718.08
5.6.190.0030.04320.33
5.6.180.0330.07720.33
5.6.170.0270.07320.52
5.6.160.0030.07720.38
5.6.150.0070.05018.21
5.6.140.0070.08318.12
5.6.130.0030.06018.12
5.6.120.0070.07020.98
5.6.110.0170.06021.08
5.6.100.0100.07320.98
5.6.90.0030.08720.96
5.6.80.0100.07720.36
5.5.350.0300.07720.52
5.5.340.0100.07717.88
5.5.330.0130.07320.19
5.5.320.0100.07720.29
5.5.310.0200.04320.27
5.5.300.0030.09018.01
5.5.290.0170.06717.98
5.5.280.0070.06020.88
5.5.270.0070.04720.96
5.5.260.0100.04020.83
5.5.250.0070.04320.68
5.5.240.0400.07020.15
5.4.450.0830.05019.46
5.4.440.0770.05719.57
5.4.430.0670.05319.62
5.4.420.0770.05719.59
5.4.410.0800.05319.37
5.4.400.0800.06718.91
5.4.390.0870.05719.11
5.4.380.0230.05718.47
5.4.370.0400.06318.54
5.4.360.0330.06718.78
5.4.350.0300.05318.57
5.4.340.0200.05718.50
5.4.320.0050.03712.46
5.4.310.0070.03712.46
5.4.300.0060.03612.46
5.4.290.0040.04312.44
5.4.280.0060.04912.33
5.4.270.0090.03912.34
5.4.260.0120.03812.33
5.4.250.0100.04512.33
5.4.240.0100.05712.33
5.4.230.0080.05712.32
5.4.220.0100.05612.32
5.4.210.0080.04612.33
5.4.200.0070.05212.32
5.4.190.0080.03812.32
5.4.180.0090.05412.32
5.4.170.0080.05412.34
5.4.160.0140.03412.33
5.4.150.0060.04012.32
5.4.140.0090.03912.01
5.4.130.0060.03912.00
5.4.120.0090.05111.96
5.4.110.0070.03811.95
5.4.100.0090.03811.95
5.4.90.0110.04011.95
5.4.80.0060.04311.95
5.4.70.0090.04011.95
5.4.60.0060.04011.95
5.4.50.0080.03911.95
5.4.40.0280.08811.93
5.4.30.0120.04811.93
5.4.20.0120.07011.93
5.4.10.0060.05311.93
5.4.00.0130.08111.41
5.3.290.0050.04012.80
5.3.280.0130.04912.71
5.3.270.0060.04312.72
5.3.260.0190.07412.72
5.3.250.0130.06512.72
5.3.240.0220.08412.72
5.3.230.0100.04312.71
5.3.220.0070.04712.68
5.3.210.0070.04112.68
5.3.200.0060.04012.68
5.3.190.0110.05612.67
5.3.180.0080.04312.68
5.3.170.0100.05412.67
5.3.160.0050.05612.67
5.3.150.0090.06012.68
5.3.140.0060.07812.66
5.3.130.0120.08812.66
5.3.120.0150.09412.66
5.3.110.0080.06012.66
5.3.100.0060.06512.12
5.3.90.0110.05212.08
5.3.80.0110.05512.07
5.3.70.0060.05012.08
5.3.60.0050.04512.06
5.3.50.0180.05812.00
5.3.40.0080.04112.00
5.3.30.0270.08411.95
5.3.20.0090.03711.72
5.3.10.0110.04211.69
5.3.00.0190.05511.68
5.2.170.0230.0569.18
5.2.160.0130.0689.18
5.2.150.0180.0539.18
5.2.140.0070.0429.18
5.2.130.0070.0429.14
5.2.120.0170.0389.14
5.2.110.0050.0339.14
5.2.100.0050.0409.14
5.2.90.0070.0349.14
5.2.80.0070.0409.14
5.2.70.0110.0719.14
5.2.60.0120.0329.09
5.2.50.0110.0599.06
5.2.40.0080.0419.04
5.2.30.0090.0579.01
5.2.20.0090.0509.00
5.2.10.0130.0358.92
5.2.00.0050.0328.78
5.1.60.0140.0378.07
5.1.50.0070.0388.06
5.1.40.0080.0248.04
5.1.30.0070.0278.39
5.1.20.0080.0278.41
5.1.10.0060.0328.14
5.1.00.0070.0328.14
5.0.50.0030.0306.61
5.0.40.0090.0246.48
5.0.30.0050.0356.29
5.0.20.0050.0206.26
5.0.10.0030.0266.24
5.0.00.0070.0276.23
4.4.90.0080.0114.78
4.4.80.0030.0214.75
4.4.70.0020.0194.75
4.4.60.0020.0184.75
4.4.50.0040.0154.77
4.4.40.0040.0254.70
4.4.30.0040.0234.75
4.4.20.0050.0214.84
4.4.10.0050.0224.85
4.4.00.0040.0274.76
4.3.110.0040.0204.67
4.3.100.0060.0164.66
4.3.90.0060.0284.63
4.3.80.0060.0344.58
4.3.70.0050.0284.63
4.3.60.0050.0224.63
4.3.50.0030.0244.63
4.3.40.0080.0334.54
4.3.30.0010.0253.28
4.3.20.0020.0253.26
4.3.10.0040.0223.21
4.3.00.0300.01310.55

preferences:
45.64 ms | 401 KiB | 5 Q