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, "'")); echo $fieldname; echo $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.0070.00718.31
8.3.50.0070.00922.04
8.3.40.0090.00618.71
8.3.30.0100.01018.91
8.3.20.0160.00320.32
8.3.10.0030.00523.66
8.3.00.0080.00019.26
8.2.180.0160.00316.75
8.2.170.0120.00922.96
8.2.160.0120.00320.57
8.2.150.0080.00024.18
8.2.140.0100.00024.66
8.2.130.0070.00026.16
8.2.120.0070.00022.25
8.2.110.0030.00622.27
8.2.100.0120.00017.72
8.2.90.0040.00419.22
8.2.80.0000.00817.97
8.2.70.0060.00317.63
8.2.60.0000.00818.04
8.2.50.0040.00418.07
8.2.40.0000.00819.88
8.2.30.0000.00718.09
8.2.20.0040.00417.58
8.2.10.0040.00418.13
8.2.00.0050.00217.64
8.1.280.0070.00725.92
8.1.270.0070.00323.96
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0030.00624.01
8.1.230.0070.00418.97
8.1.220.0050.00317.74
8.1.210.0000.00818.77
8.1.200.0030.00617.10
8.1.190.0000.00817.13
8.1.180.0000.01018.88
8.1.170.0050.00318.44
8.1.160.0070.00021.96
8.1.150.0070.00318.53
8.1.140.0040.00417.33
8.1.130.0000.00717.81
8.1.120.0000.00817.43
8.1.110.0000.00717.34
8.1.100.0000.00717.43
8.1.90.0070.00017.33
8.1.80.0000.00717.46
8.1.70.0030.00317.46
8.1.60.0030.00617.41
8.1.50.0000.00717.32
8.1.40.0080.00017.45
8.1.30.0000.00817.54
8.1.20.0060.00317.54
8.1.10.0000.00717.52
8.1.00.0040.00417.36
8.0.300.0000.00820.56
8.0.290.0040.00417.18
8.0.280.0050.00318.46
8.0.270.0030.00317.20
8.0.260.0030.00317.36
8.0.250.0030.00616.86
8.0.240.0040.00416.97
8.0.230.0050.00316.93
8.0.220.0030.00316.88
8.0.210.0070.00016.88
8.0.200.0000.00616.82
8.0.190.0080.00016.89
8.0.180.0030.00616.87
8.0.170.0000.00816.86
8.0.160.0040.00416.75
8.0.150.0040.00416.68
8.0.140.0000.00716.83
8.0.130.0080.00013.21
8.0.120.0040.00416.82
8.0.110.0080.00016.85
8.0.100.0030.00316.71
8.0.90.0000.00816.92
8.0.80.0070.01416.91
8.0.70.0040.00416.73
8.0.60.0020.00516.83
8.0.50.0040.00416.84
8.0.30.0130.00617.04
8.0.20.0170.00517.40
8.0.10.0000.00717.00
8.0.00.0110.00816.71
7.4.330.0000.00515.00
7.4.320.0030.00316.48
7.4.300.0000.00716.33
7.4.290.0030.00316.57
7.4.280.0090.00016.51
7.4.270.0000.00716.56
7.4.260.0000.00716.47
7.4.250.0040.00416.48
7.4.240.0030.00516.50
7.4.230.0070.00016.63
7.4.220.0090.00916.65
7.4.210.0090.00616.41
7.4.200.0020.00516.49
7.4.190.0000.00716.54
7.4.160.0100.00716.43
7.4.150.0100.00717.40
7.4.140.0140.00517.86
7.4.130.0130.00416.44
7.4.120.0140.00316.35
7.4.110.0140.00416.70
7.4.100.0090.00916.38
7.4.90.0100.00716.53
7.4.80.0100.01019.39
7.4.70.0190.00316.52
7.4.60.0060.00916.26
7.4.50.0030.00616.29
7.4.40.0060.01616.33
7.4.30.0100.00616.50
7.4.10.0090.00914.99
7.4.00.0090.00714.98
7.3.330.0000.00812.91
7.3.320.0000.00613.09
7.3.310.0000.00716.29
7.3.300.0060.00016.26
7.3.290.0090.00616.18
7.3.280.0070.01016.18
7.3.270.0140.00317.40
7.3.260.0060.01216.23
7.3.250.0080.00916.30
7.3.240.0090.00916.68
7.3.230.0060.00916.39
7.3.210.0260.01016.21
7.3.200.0040.01719.39
7.3.190.0060.01316.53
7.3.180.0160.00016.32
7.3.170.0090.01316.47
7.3.160.0040.01516.20
7.3.130.0070.01114.72
7.3.120.0070.01014.81
7.3.110.0120.00514.78
7.3.100.0020.01214.99
7.3.90.0030.00914.90
7.3.80.0040.00714.79
7.3.70.0090.00414.79
7.3.60.0100.00314.69
7.3.50.0060.00714.60
7.3.40.0070.00514.85
7.3.30.0050.00514.68
7.3.20.0060.00816.58
7.3.10.0040.01016.51
7.3.00.0050.01016.53
7.2.330.0100.01316.61
7.2.320.0110.00616.32
7.2.310.0030.01716.62
7.2.300.0030.01316.61
7.2.290.0100.00716.40
7.2.260.0100.00715.17
7.2.250.0020.01814.96
7.2.240.0090.00615.19
7.2.230.0030.01115.13
7.2.220.0050.00815.12
7.2.210.0060.00915.00
7.2.200.0040.01115.09
7.2.190.0090.00414.78
7.2.180.0050.01014.90
7.2.170.0020.01114.77
7.2.160.0030.01014.77
7.2.150.0070.00616.78
7.2.140.0050.01316.98
7.2.130.0070.00616.92
7.2.120.0100.00516.64
7.2.110.0060.00616.83
7.2.100.0080.00616.72
7.2.90.0050.01216.74
7.2.80.0050.00816.92
7.2.70.0040.00816.79
7.2.60.0090.00316.81
7.2.50.0060.00916.73
7.2.40.0040.00916.93
7.2.30.0020.00916.94
7.2.20.0050.00816.75
7.2.10.0040.01016.83
7.2.00.0090.00716.74
7.1.330.0030.01215.85
7.1.320.0110.00315.87
7.1.310.0050.00815.89
7.1.300.0000.01015.68
7.1.290.0050.00815.67
7.1.280.0030.00615.84
7.1.270.0040.00915.82
7.1.260.0050.00715.65
7.1.250.0070.00415.86
7.1.240.0040.01115.86
7.1.230.0060.00815.85
7.1.220.0070.00715.76
7.1.210.0060.00715.69
7.1.200.0110.00615.72
7.1.190.0030.00915.70
7.1.180.0040.00615.83
7.1.170.0020.01215.66
7.1.160.0080.00315.83
7.1.150.0070.00915.95
7.1.140.0080.00915.75
7.1.130.0080.00715.90
7.1.120.0050.00815.63
7.1.110.0080.00515.76
7.1.100.0070.00515.88
7.1.90.0030.01415.73
7.1.80.0030.01015.89
7.1.70.0060.00616.05
7.1.60.0080.00917.10
7.1.50.0040.00816.20
7.1.40.0050.00915.85
7.1.30.0040.01115.71
7.1.20.0110.00615.81
7.1.10.0080.00515.73
7.1.00.0030.03217.93
7.0.330.0080.00315.43
7.0.320.0030.01015.46
7.0.310.0060.01115.33
7.0.300.0080.00615.30
7.0.290.0090.00515.23
7.0.280.0050.01115.32
7.0.270.0050.01015.31
7.0.260.0020.01315.50
7.0.250.0080.00715.55
7.0.240.0070.00415.27
7.0.230.0070.01015.46
7.0.220.0090.00615.42
7.0.210.0080.00715.31
7.0.200.0210.00815.14
7.0.190.0050.00715.43
7.0.180.0090.00815.28
7.0.170.0130.00315.41
7.0.160.0070.00815.37
7.0.150.0020.01315.33
7.0.140.0050.03017.65
7.0.130.0040.00915.20
7.0.120.0080.00615.59
7.0.110.0050.00715.26
7.0.100.0040.00715.36
7.0.90.0040.00615.32
7.0.80.0040.00715.30
7.0.70.0050.01015.24
7.0.60.0090.03016.93
7.0.50.0030.02116.34
7.0.40.0060.03415.75
7.0.30.0120.02615.67
7.0.20.0080.02515.50
7.0.10.0110.03215.70
7.0.00.0020.03715.73
5.6.400.0030.00814.32
5.6.390.0040.00614.15
5.6.380.0030.00814.21
5.6.370.0100.00314.34
5.6.360.0040.01314.24
5.6.350.0040.00714.34
5.6.340.0120.00414.48
5.6.330.0090.00514.24
5.6.320.0060.00614.36
5.6.310.0080.00814.37
5.6.300.0060.00614.26
5.6.290.0000.00914.21
5.6.280.0070.02916.51
5.6.270.0060.00514.21
5.6.260.0030.01314.21
5.6.250.0050.01214.47
5.6.240.0040.01114.29
5.6.230.0070.00914.25
5.6.220.0070.00514.38
5.6.210.0090.02816.28
5.6.200.0040.02015.74
5.6.190.0100.01916.44
5.6.180.0180.02016.26
5.6.170.0130.03216.45
5.6.160.0090.03216.39
5.6.150.0040.03115.38
5.6.140.0050.03415.64
5.6.130.0070.02915.46
5.6.120.0090.03016.48
5.6.110.0040.02916.63
5.6.100.0080.01616.59
5.6.90.0080.02716.53
5.6.80.0060.01716.31
5.6.70.0040.01214.26
5.6.60.0050.01014.45
5.6.50.0050.00814.13
5.6.40.0060.00614.33
5.6.30.0070.00814.28
5.6.20.0090.00814.25
5.6.10.0080.00514.24
5.6.00.0060.00914.22
5.5.380.0080.00614.27
5.5.370.0030.00714.23
5.5.360.0030.01214.05
5.5.350.1200.01916.28
5.5.340.0070.03215.34
5.5.330.0080.03016.31
5.5.320.1070.02116.13
5.5.310.0110.02916.27
5.5.300.0070.02915.46
5.5.290.0060.02615.65
5.5.280.0020.02216.39
5.5.270.0080.03016.47
5.5.260.0060.01916.36
5.5.250.0040.02416.26
5.5.240.0030.03016.24
5.5.230.0060.00914.14
5.5.220.0010.01613.98
5.5.210.0030.01014.02
5.5.200.0070.00414.21
5.5.190.0080.00914.21
5.5.180.0030.00914.26
5.5.170.0040.00914.06
5.5.160.0120.00314.24
5.5.150.0050.00814.14
5.5.140.0060.00714.34
5.5.130.0020.00913.86
5.5.120.0040.01013.86
5.5.110.0090.00514.20
5.5.100.0060.01014.12
5.5.90.0070.00914.31
5.5.80.0010.01014.15
5.5.70.0040.00813.96
5.5.60.0050.00714.08
5.5.50.0030.01214.12
5.5.40.0100.00613.98
5.5.30.0030.01114.17
5.5.20.0060.00914.21
5.5.10.0080.00614.03
5.5.00.0060.00713.89
5.4.450.0190.02413.67
5.4.440.0140.01913.58
5.4.430.0100.02013.90
5.4.420.0020.02813.90
5.4.410.0080.02013.70
5.4.400.0100.01913.71
5.4.390.0040.02913.50
5.4.380.0160.02013.41
5.4.370.0140.02213.57
5.4.360.0170.01713.57
5.4.350.0060.02713.56
5.4.340.0100.02013.49
5.4.330.0030.00910.90
5.4.320.0040.02111.49
5.4.310.0060.01611.42
5.4.300.0040.01711.48
5.4.290.0050.02011.33
5.4.280.0080.01511.30
5.4.270.0050.02211.32
5.4.260.0060.02011.42
5.4.250.0060.01911.37
5.4.240.0040.02011.37
5.4.230.0060.01711.37
5.4.220.0090.01611.43
5.4.210.0060.01911.36
5.4.200.0020.02111.29
5.4.190.0040.02411.24
5.4.180.0090.01711.27
5.4.170.0060.02211.29
5.4.160.0070.02711.24
5.4.150.0090.01811.20
5.4.140.0050.02111.25
5.4.130.0060.01511.40
5.4.120.0050.02011.18
5.4.110.0060.01611.24
5.4.100.0070.01311.27
5.4.90.0060.02311.29
5.4.80.0050.02011.37
5.4.70.0080.01911.24
5.4.60.0090.02111.21
5.4.50.0050.01611.34
5.4.40.0070.01411.15
5.4.30.0040.01711.25
5.4.20.0090.01111.24
5.4.10.0040.01911.35
5.4.00.0050.01811.18
5.3.290.0070.01411.33
5.3.280.0050.01911.15
5.3.270.0040.01711.26
5.3.260.0040.02111.11
5.3.250.0040.02211.11
5.3.240.0060.01811.06
5.3.230.0060.01911.14
5.3.220.0030.02011.09
5.3.210.0040.02311.08
5.3.200.0030.02111.02
5.3.190.0020.02011.14
5.3.180.0040.02311.19
5.3.170.0030.01811.14
5.3.160.0030.01911.15
5.3.150.0050.01711.21
5.3.140.0060.02411.15
5.3.130.0040.02111.06
5.3.120.0140.03011.13
5.3.110.0080.02311.14
5.3.100.0070.02810.98
5.3.90.0050.01810.96
5.3.80.0060.01610.84
5.3.70.0060.01710.84
5.3.60.0040.01810.98
5.3.50.0070.02210.79
5.3.40.0130.02110.88
5.3.30.0040.02210.81
5.3.20.0060.02110.72
5.3.10.0060.02510.65
5.3.00.0050.02210.65
5.2.170.0060.0429.18
5.2.160.0060.0429.19
5.2.150.0090.0409.19
5.2.140.0070.0439.18
5.2.130.0060.0379.14
5.2.120.0140.0449.14
5.2.110.0090.0369.14
5.2.100.0130.0629.14
5.2.90.0120.0409.14
5.2.80.0090.0359.13
5.2.70.0090.0399.14
5.2.60.0070.0459.09
5.2.50.0120.0399.06
5.2.40.0150.0399.04
5.2.30.0050.0389.01
5.2.20.0040.0319.00
5.2.10.0060.0308.92
5.2.00.0060.0318.78
5.1.60.0060.0258.07
5.1.50.0070.0298.06
5.1.40.0080.0238.04
5.1.30.0060.0338.39
5.1.20.0030.0298.41
5.1.10.0040.0278.14
5.1.00.0060.0268.14
5.0.50.0040.0216.61
5.0.40.0050.0196.48
5.0.30.0020.0346.29
5.0.20.0050.0206.26
5.0.10.0030.0246.24
5.0.00.0030.0336.23
4.4.90.0050.0144.78
4.4.80.0030.0154.75
4.4.70.0060.0134.76
4.4.60.0030.0174.75
4.4.50.0040.0174.77
4.4.40.0070.0354.70
4.4.30.0060.0174.76
4.4.20.0060.0204.85
4.4.10.0070.0204.85
4.4.00.0040.0324.76
4.3.110.0040.0174.67
4.3.100.0040.0154.66
4.3.90.0020.0234.63
4.3.80.0070.0254.58
4.3.70.0030.0194.63
4.3.60.0030.0164.63
4.3.50.0030.0164.63
4.3.40.0040.0254.53
4.3.30.0020.0173.29
4.3.20.0020.0183.26
4.3.10.0030.0143.22
4.3.00.0070.0238.24

preferences:
42.25 ms | 401 KiB | 5 Q