3v4l.org

run code in 300+ PHP versions simultaneously
<?php $content = '/NameType /FlateDecode /Contents[4 0 R 42]/Fonts<</F1 41/F2 43>>/NullType null/StringType(hello))/DateType(D:20130901235555+02\'00\')/XRefType 2 0 R /NumericType 8/HexaType<0020>/BooleanType false'; if (preg_match('/^\s*\((?P<name>.*)/s', $content, $match)) { } $offset=0; if (preg_match('/^\s*(?P<name>\/[A-Z0-9\._]+)(?P<value>.*)/si', substr($content, 0), $match)) { print_r($match); } if (preg_match('/^\s*\((?P<name>.*)/s', $content, $match)) { $name = $match['name']; // Find next ')' not escaped. $cur_start_text = $start_search_end = 0; while (($cur_start_pos = strpos($name, ')/', $start_search_end)) !== false) { $cur_extract = substr($name, $cur_start_text, $cur_start_pos - $cur_start_text); preg_match('/(?P<escape>[\\\]*)$/s', $cur_extract, $match); if (!(strlen($match['escape']) % 2)) { break; } $start_search_end = $cur_start_pos + 1; } // Extract string. $name = substr($name, 0, $cur_start_pos); $offset += strpos($content, '(') + $cur_start_pos + 2; // 2 for '(' and ')' $name = str_replace( array('\\\\', '\\ ', '\\/', '\(', '\)', '\n', '\r', '\t'), array('\\', ' ', '/', '(', ')', "\n", "\r", "\t"), $name ); print_r($name); } // your code goes here echo "test";

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.0160.00618.31
8.3.50.0090.01021.97
8.3.40.0110.00418.80
8.3.30.0110.00419.12
8.3.20.0000.00820.33
8.3.10.0080.00021.96
8.3.00.0110.00422.34
8.2.180.0090.00617.00
8.2.170.0120.00322.96
8.2.160.0060.01121.01
8.2.150.0050.00324.18
8.2.140.0000.00824.66
8.2.130.0080.00026.16
8.2.120.0030.00619.51
8.2.110.0090.00022.29
8.2.100.0090.00319.88
8.2.90.0080.00019.08
8.2.80.0060.00318.04
8.2.70.0040.00417.63
8.2.60.0040.00417.80
8.2.50.0060.00318.07
8.2.40.0040.00418.22
8.2.30.0020.00518.12
8.2.20.0000.00817.85
8.2.10.0080.00017.88
8.2.00.0000.00817.81
8.1.280.0110.00425.92
8.1.270.0080.00022.27
8.1.260.0080.00026.35
8.1.250.0080.00028.09
8.1.240.0040.00423.96
8.1.230.0030.00719.13
8.1.220.0080.00017.74
8.1.210.0040.00418.77
8.1.200.0030.00617.61
8.1.190.0040.00417.43
8.1.180.0030.00518.10
8.1.170.0000.00818.76
8.1.160.0050.00322.05
8.1.150.0040.00418.82
8.1.140.0000.00817.52
8.1.130.0040.00417.89
8.1.120.0070.00017.49
8.1.110.0000.00717.54
8.1.100.0040.00417.55
8.1.90.0000.00817.43
8.1.80.0030.00517.61
8.1.70.0070.00017.54
8.1.60.0000.00817.69
8.1.50.0000.00717.71
8.1.40.0080.00017.70
8.1.30.0030.00617.82
8.1.20.0000.00817.82
8.1.10.0000.00717.68
8.1.00.0050.00317.59
8.0.300.0000.00718.77
8.0.290.0030.00617.18
8.0.280.0000.00818.50
8.0.270.0000.00717.35
8.0.260.0000.00716.87
8.0.250.0030.00317.08
8.0.240.0040.00417.05
8.0.230.0040.00416.97
8.0.220.0000.00717.05
8.0.210.0040.00417.05
8.0.200.0060.00017.07
8.0.190.0040.00417.15
8.0.180.0000.00817.02
8.0.170.0000.00817.07
8.0.160.0030.00517.02
8.0.150.0000.00816.79
8.0.140.0060.00316.97
8.0.130.0030.00313.48
8.0.120.0000.00716.98
8.0.110.0040.00416.95
8.0.100.0080.00016.97
8.0.90.0000.00816.96
8.0.80.0030.01416.96
8.0.70.0020.00516.95
8.0.60.0040.00417.13
8.0.50.0050.00216.98
8.0.30.0140.00517.14
8.0.20.0070.01517.40
8.0.10.0080.00017.07
8.0.00.0100.00816.81
7.4.330.0000.00515.09
7.4.320.0070.00016.77
7.4.300.0030.00316.80
7.4.290.0030.00316.73
7.4.280.0030.00516.74
7.4.270.0000.00716.77
7.4.260.0040.00416.57
7.4.250.0080.00016.64
7.4.240.0030.00516.73
7.4.230.0000.00716.90
7.4.220.0110.00716.84
7.4.210.0080.00916.74
7.4.200.0040.00416.79
7.4.190.0030.00516.75
7.4.160.0070.01316.70
7.4.150.0100.00717.40
7.4.140.0090.01117.86
7.4.130.0080.01016.71
7.4.120.0060.01216.63
7.4.110.0100.00716.41
7.4.100.0090.00916.59
7.4.90.0070.01016.77
7.4.80.0130.01019.39
7.4.70.0140.00316.73
7.4.60.0070.01116.54
7.4.50.0020.00216.52
7.4.40.0120.00022.77
7.4.30.0100.00716.84
7.4.00.0070.01015.12
7.3.330.0000.00513.06
7.3.320.0000.00613.24
7.3.310.0040.00416.17
7.3.300.0000.00716.30
7.3.290.0070.01316.34
7.3.280.0120.00616.34
7.3.270.0100.00717.40
7.3.260.0070.01116.68
7.3.250.0110.00816.65
7.3.240.0110.00716.54
7.3.230.0100.01016.62
7.3.210.0070.01016.51
7.3.200.0090.01219.39
7.3.190.0060.01616.34
7.3.180.0070.01016.62
7.3.170.0100.01316.64
7.3.160.0130.00316.23
7.3.120.0090.00914.50
7.2.330.0070.01016.76
7.2.320.0130.01016.54
7.2.310.0090.00916.55
7.2.300.0110.00616.75
7.2.290.0120.00416.61
7.2.120.0060.00616.74
7.2.110.0030.01316.63
7.2.100.0000.01416.75
7.2.90.0070.00316.79
7.2.80.0040.00416.71
7.2.70.0040.01116.81
7.2.60.0050.00817.03
7.2.50.0090.00617.04
7.2.40.0040.01117.05
7.2.30.0030.00617.03
7.2.20.0080.00416.87
7.2.10.0030.00617.07
7.2.00.0020.01318.29
7.1.240.0060.00616.00
7.1.230.0090.00615.90
7.1.220.0030.00615.95
7.1.210.0060.00615.85
7.1.200.0040.00915.87
7.1.190.0040.00815.69
7.1.180.0000.01215.61
7.1.170.0030.00716.07
7.1.160.0000.01215.83
7.1.150.0060.00615.88
7.1.140.0060.01015.71
7.1.130.0030.01016.04
7.1.120.0060.00615.98
7.1.110.0040.01116.11
7.1.100.0020.01217.24
7.1.90.0000.00915.79
7.1.80.0080.00415.89
7.1.70.0020.00816.65
7.1.60.0100.00717.77
7.1.50.0130.00616.50
7.1.40.0030.01015.98
7.1.30.0040.00715.98
7.1.20.0070.00715.93
7.1.10.0030.00716.03
7.1.00.0060.03819.15
7.0.320.0030.01015.65
7.0.310.0040.01115.58
7.0.300.0100.00315.69
7.0.290.0060.00915.48
7.0.280.0040.00715.36
7.0.270.0090.00615.47
7.0.260.0030.00715.61
7.0.250.0040.00415.53
7.0.240.0080.00815.71
7.0.230.0060.00615.62
7.0.220.0070.00015.73
7.0.210.0070.00715.38
7.0.200.0020.00616.10
7.0.190.0030.01015.44
7.0.180.0060.00615.62
7.0.170.0020.00515.67
7.0.160.0070.00715.43
7.0.150.0030.01015.59
7.0.140.0050.04018.86
7.0.130.0040.00415.61
7.0.120.0030.01015.68
7.0.110.0040.01115.65
7.0.100.0100.00315.69
7.0.90.0030.00915.39
7.0.80.0060.00615.44
7.0.70.0000.01215.29
7.0.60.0030.02517.73
7.0.50.0080.04216.71
7.0.40.0050.04116.97
7.0.30.0230.03716.92
7.0.20.0150.03016.91
7.0.10.0150.02916.90
7.0.00.0050.04416.76
5.6.380.0040.00414.14
5.6.370.0030.00614.50
5.6.360.0030.01014.54
5.6.350.0030.01014.39
5.6.340.0060.00914.31
5.6.330.0040.00413.98
5.6.320.0030.01014.37
5.6.310.0000.01114.14
5.6.300.0030.00714.28
5.6.290.0040.00814.57
5.6.280.0110.03517.70
5.6.270.0050.00314.35
5.6.260.0040.00414.44
5.6.250.0070.00714.58
5.6.240.0060.00614.39
5.6.230.0030.01014.21
5.6.220.0050.00314.14
5.6.210.0050.02717.45
5.6.200.0060.04516.43
5.6.190.0070.04517.37
5.6.180.1860.02617.47
5.6.170.0200.04217.49
5.6.160.0100.03017.49
5.6.150.0060.04516.31
5.6.140.0020.03016.39
5.6.130.0030.03916.36
5.6.120.0050.02717.64
5.6.110.0040.04717.61
5.6.100.0070.04717.52
5.6.90.0140.04017.50
5.6.80.0080.04117.35
5.6.70.0210.03117.21
5.6.60.0060.00614.20
5.6.50.0030.01014.24
5.6.40.0070.00714.53
5.6.30.0060.00614.05
5.6.20.0100.00314.13
5.6.10.0070.00714.32
5.6.00.0070.00714.20
5.5.380.0070.00311.24
5.5.370.0060.00311.16
5.5.360.0040.00411.16
5.5.350.0030.04415.80
5.5.340.0020.02114.63
5.5.330.0050.04415.77
5.5.320.0200.03815.45
5.5.310.0100.02315.64
5.5.300.0070.03814.39
5.5.290.0050.03314.55
5.5.280.0050.03315.88
5.5.270.0030.02815.88
5.5.260.0120.03416.04
5.5.250.0030.03215.74
5.5.240.0090.04015.66
5.5.230.0040.00811.32
5.5.220.0060.00310.87
5.5.210.0090.00010.84
5.5.200.0050.00211.18
5.5.190.0040.00810.76
5.5.180.0080.00410.88
5.5.170.0030.01014.33
5.5.160.0030.00311.20
5.5.150.0030.00610.99
5.5.140.0030.00610.95
5.5.130.0050.00211.19
5.5.120.0000.00910.85
5.5.110.0100.00010.97
5.5.100.0090.00311.32
5.5.90.0030.00711.20
5.5.80.0090.00311.03
5.5.70.0060.00611.16
5.5.60.0090.00310.96
5.5.50.0060.00311.11
5.5.40.0040.00811.25
5.5.30.0090.00010.87
5.5.20.0030.00611.00
5.5.10.0000.00511.20
5.5.00.0060.00011.05
5.4.450.0130.02815.39
5.4.440.0130.02815.16
5.4.430.0120.04415.24
5.4.420.0150.03815.30
5.4.410.0150.03914.99
5.4.400.0120.03215.05
5.4.390.0170.03815.11
5.4.380.0160.03315.23
5.4.370.0170.03714.97
5.4.360.0230.03215.17
5.4.350.0190.03314.98
5.4.340.0110.02115.06
5.4.330.0050.00010.85
5.4.320.0120.02915.10
5.4.310.0120.04214.93
5.4.300.0120.03514.91
5.4.290.0150.02214.93
5.4.280.0150.04015.02
5.4.270.0100.03615.08
5.4.260.0120.02315.12
5.4.250.0170.02214.93
5.4.240.0120.03115.09
5.4.230.0120.04415.16
5.4.220.0130.03115.12
5.4.210.0170.03515.02
5.4.200.0150.03714.94
5.4.190.0080.03115.12
5.4.180.0170.02215.01
5.4.170.0120.02214.97
5.4.160.0100.02314.90
5.4.150.0130.02215.16
5.4.140.0100.02813.56
5.4.130.0150.02613.81
5.4.120.0140.01813.76
5.4.110.0110.03013.75
5.4.100.0130.02813.77
5.4.90.0100.02513.69
5.4.80.0060.02913.70
5.4.70.0230.03213.71
5.4.60.0150.03913.53
5.4.50.0190.03413.77
5.4.40.0150.02313.82
5.4.30.0120.03313.79
5.4.20.0120.02313.72
5.4.10.0120.02913.72
5.4.00.0200.02213.48
5.3.290.0140.03812.81
5.3.280.0170.03812.77
5.3.270.0130.02212.83
5.3.260.0120.03312.80
5.3.250.0100.02312.69
5.3.240.0140.02012.62
5.3.230.0170.02212.79
5.3.220.0200.03512.71
5.3.210.0120.03512.69
5.3.200.0180.02512.75
5.3.190.0120.02712.77
5.3.180.0090.02512.62
5.3.170.0130.03812.62
5.3.160.0150.04112.77
5.3.150.0150.03812.79
5.3.140.0170.03412.79
5.3.130.0130.04412.68
5.3.120.0130.04012.79
5.3.110.0120.02512.76
5.3.100.0150.03712.79
5.3.90.0150.03712.79
5.3.80.0130.03812.70
5.3.70.0160.03812.67
5.3.60.0150.02812.74
5.3.50.0080.03312.65
5.3.40.0150.03212.65
5.3.30.0100.02512.71
5.3.20.0120.03712.65
5.3.10.0150.03012.61
5.3.00.0110.03112.62
5.2.170.0150.03012.61
5.2.160.0130.03112.61
5.2.150.0120.02512.61
5.2.140.0080.01812.61
5.2.130.0140.02912.61
5.2.120.0060.02312.61
5.2.110.0130.03312.61
5.2.100.0120.02712.61
5.2.90.0120.02212.61
5.2.80.0100.02312.61
5.2.70.0070.02512.61
5.2.60.0110.01712.61
5.2.50.0170.02512.61
5.2.40.0180.01812.61
5.2.30.0140.02412.61
5.2.20.0130.03012.61
5.2.10.0150.01712.61
5.2.00.0120.02912.61
5.1.60.0080.02112.61
5.1.50.0100.01912.61
5.1.40.0080.01812.61
5.1.30.0100.01812.61
5.1.20.0150.01912.61
5.1.10.0130.01512.61
5.1.00.0120.01512.61
5.0.50.0100.02312.61
5.0.40.0090.01212.61
5.0.30.0110.01612.61
5.0.20.0070.01712.61
5.0.10.0030.02512.61
5.0.00.0050.02912.61
4.4.90.0030.01512.61
4.4.80.0050.01212.61
4.4.70.0090.01412.61
4.4.60.0060.01712.61
4.4.50.0030.01712.61
4.4.40.0030.03012.61
4.4.30.0050.01312.61
4.4.20.0070.01612.61
4.4.10.0050.01312.61
4.4.00.0080.02512.61
4.3.110.0080.01812.61
4.3.100.0070.01712.61
4.3.90.0070.01412.61
4.3.80.0070.02712.61
4.3.70.0050.02012.61
4.3.60.0050.01712.61
4.3.50.0050.02012.61
4.3.40.0050.02712.61
4.3.30.0050.01712.61
4.3.20.0030.02112.61
4.3.10.0020.02312.61
4.3.00.0070.01012.61

preferences:
50.33 ms | 401 KiB | 5 Q