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; $position=0; if (preg_match('/^\s*(?P<name>\/[A-Z0-9\._]+)(?P<value>.*)/si', substr($content, 0), $match)) { $name = ltrim($match['name'], '/'); $value = $match['value']; $position = strpos($content, $value, $position + strlen($match['name'])); print_r($position); } $offset=$position; //if (preg_match('/^\s*\((?P<name>.*)/s', $value, $match)) {7 $name = $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.70.0150.00616.63
8.3.60.0120.00318.56
8.3.50.0080.01022.11
8.3.40.0070.00719.05
8.3.30.0070.01419.05
8.3.20.0060.00319.02
8.3.10.0040.00420.78
8.3.00.0090.00317.88
8.2.180.0060.00918.30
8.2.170.0040.01122.96
8.2.160.0000.01422.33
8.2.150.0150.00324.18
8.2.140.0030.00624.66
8.2.130.0100.01026.16
8.2.120.0070.00020.08
8.2.110.0030.00721.12
8.2.100.0120.00018.10
8.2.90.0040.00419.26
8.2.80.0030.00517.97
8.2.70.0060.00617.86
8.2.60.0050.00518.05
8.2.50.0030.00518.07
8.2.40.0040.00418.34
8.2.30.0040.00419.88
8.2.20.0030.00517.91
8.2.10.0050.00317.95
8.2.00.0040.00417.91
8.1.280.0140.00425.92
8.1.270.0140.00023.99
8.1.260.0090.00926.35
8.1.250.0210.00028.09
8.1.240.0090.00022.46
8.1.230.0000.01120.97
8.1.220.0040.00418.77
8.1.210.0030.00519.00
8.1.200.0000.01017.13
8.1.190.0040.00417.63
8.1.180.0000.00818.10
8.1.170.0040.00418.87
8.1.160.0040.00418.93
8.1.150.0040.00418.81
8.1.140.0040.00417.54
8.1.130.0000.00717.84
8.1.120.0040.00417.62
8.1.110.0050.00317.64
8.1.100.0000.00817.60
8.1.90.0040.00417.61
8.1.80.0050.00217.47
8.1.70.0030.00317.57
8.1.60.0050.00317.56
8.1.50.0040.00417.63
8.1.40.0040.00417.66
8.1.30.0050.00317.67
8.1.20.0040.00417.85
8.1.10.0070.00017.67
8.1.00.0040.00417.72
8.0.300.0020.00519.95
8.0.290.0000.00817.00
8.0.280.0000.00718.59
8.0.270.0000.00717.26
8.0.260.0040.00418.70
8.0.250.0070.00017.14
8.0.240.0070.00017.04
8.0.230.0080.00017.16
8.0.220.0030.00317.11
8.0.210.0030.00316.99
8.0.200.0000.00717.15
8.0.190.0000.00817.03
8.0.180.0000.00816.98
8.0.170.0060.00316.96
8.0.160.0030.00517.11
8.0.150.0090.00017.07
8.0.140.0000.00817.03
8.0.130.0000.00513.52
8.0.120.0000.00816.95
8.0.110.0000.00816.89
8.0.100.0050.00217.04
8.0.90.0080.00016.98
8.0.80.0030.01317.07
8.0.70.0040.00417.13
8.0.60.0000.00816.88
8.0.50.0080.00017.05
8.0.30.0120.00817.54
8.0.20.0130.00617.40
8.0.10.0050.00317.21
8.0.00.0090.01216.79
7.4.330.0050.00015.10
7.4.320.0000.00616.74
7.4.300.0000.00616.83
7.4.290.0000.00716.74
7.4.280.0050.00316.90
7.4.270.0000.00816.91
7.4.260.0050.00013.47
7.4.250.0030.00516.83
7.4.240.0000.00716.92
7.4.230.0040.00316.73
7.4.220.0130.01016.72
7.4.210.0050.01016.87
7.4.200.0000.00816.63
7.4.190.0040.00416.82
7.4.160.0090.00616.79
7.4.150.0090.00917.40
7.4.140.0160.00717.43
7.4.130.0040.01216.67
7.4.120.0110.00916.79
7.4.110.0110.00616.61
7.4.100.0120.00616.79
7.4.90.0060.01716.57
7.4.80.0060.01619.03
7.4.70.0040.01316.76
7.4.60.0100.00716.67
7.4.50.0080.00016.52
7.4.40.0030.01222.27
7.4.30.0090.00616.83
7.4.00.0100.00514.96
7.3.330.0000.00513.39
7.3.320.0030.00313.43
7.3.310.0070.00016.62
7.3.300.0030.00316.53
7.3.290.0030.01116.51
7.3.280.0080.00916.53
7.3.270.0140.00317.40
7.3.260.0070.01118.24
7.3.250.0070.01216.49
7.3.240.0140.00316.60
7.3.230.0070.01016.39
7.3.210.0090.00916.83
7.3.200.0120.00619.39
7.3.190.0100.01416.54
7.3.180.0110.00516.76
7.3.170.0160.00716.62
7.3.160.0040.01216.71
7.3.120.0060.01115.03
7.3.110.0070.00714.87
7.3.100.0030.01015.26
7.3.90.0110.00414.91
7.3.80.0060.00915.09
7.3.70.0060.00614.93
7.3.60.0060.00615.06
7.3.50.0030.00914.75
7.3.40.0070.01115.11
7.3.30.0070.01114.82
7.3.20.0040.01117.00
7.3.10.0030.01016.86
7.3.00.0070.01016.64
7.2.330.0160.00316.61
7.2.320.0160.00816.74
7.2.310.0100.00716.86
7.2.300.0070.01416.74
7.2.290.0060.01016.52
7.2.250.0040.01515.19
7.2.240.0090.01215.43
7.2.230.0040.00815.41
7.2.220.0060.00915.13
7.2.210.0060.01015.10
7.2.200.0000.01015.23
7.2.190.0070.01015.38
7.2.180.0110.00714.89
7.2.170.0100.00315.04
7.2.00.0110.00319.55
7.1.330.0000.01416.13
7.1.320.0030.01015.80
7.1.310.0100.00716.11
7.1.300.0060.00616.06
7.1.290.0090.00615.88
7.1.280.0090.00315.89
7.1.270.0100.00716.14
7.1.260.0040.00715.93
7.1.200.0030.00916.06
7.1.100.0030.01018.20
7.1.70.0000.00817.27
7.1.60.0030.02019.40
7.1.50.0060.00617.15
7.1.00.0030.06322.56
7.0.200.0180.00616.60
7.0.140.0000.07721.92
7.0.60.0100.07720.00
7.0.50.0130.07317.86
7.0.40.0100.08320.06
7.0.30.0100.05020.36
7.0.20.0270.04020.18
7.0.10.0030.08320.25
7.0.00.0070.06320.01
5.6.280.0000.07721.07
5.6.210.0070.08020.63
5.6.200.0030.05018.23
5.6.190.0070.05020.60
5.6.180.4100.04020.67
5.6.170.0200.04320.52
5.6.160.0030.07320.48
5.6.150.0130.04718.20
5.6.140.0000.04018.11
5.6.130.0100.07718.18
5.6.120.0030.09021.04
5.6.110.0030.04320.98
5.6.100.0070.08020.97
5.6.90.0270.05720.98
5.6.80.0030.08320.39
5.6.70.3270.03320.35
5.5.350.0100.08020.33
5.5.340.0100.05017.95
5.5.330.0170.04020.19
5.5.320.0130.07020.29
5.5.310.0170.06320.30
5.5.300.0100.03317.97
5.5.290.0070.07017.91
5.5.280.0070.03720.75
5.5.270.0070.05320.80
5.5.260.0100.07320.88
5.5.250.0200.06720.79
5.5.240.0330.07020.36
5.4.450.0030.04019.50
5.4.440.0070.03719.32
5.4.430.0130.03019.47
5.4.420.0000.05019.40
5.4.410.0070.03719.28
5.4.400.0000.04019.21
5.4.390.0100.03018.92
5.4.380.0000.04018.92
5.4.370.0070.03319.09
5.4.360.0070.04019.17
5.4.350.0000.05019.08
5.4.340.0130.07319.15
5.4.320.0070.06718.80
5.4.310.0070.06719.08
5.4.300.0170.05719.18
5.4.290.0000.05719.14
5.4.280.0030.08018.79
5.4.270.0000.06019.08
5.4.260.0030.07719.08
5.4.250.0070.06018.80
5.4.240.0130.06019.17
5.4.230.0200.06018.81
5.4.220.0070.08019.14
5.4.210.0070.07319.13
5.4.200.0130.03319.11
5.4.190.0100.03718.77
5.4.180.0070.04718.91
5.4.170.0070.07718.91
5.4.160.0070.07718.79
5.4.150.0030.07019.16
5.4.140.0100.07016.38
5.4.130.0170.06316.45
5.4.120.0070.07016.38
5.4.110.0030.06716.27
5.4.100.0100.05016.27
5.4.90.0200.05716.36
5.4.80.0030.08316.27
5.4.70.0000.08016.32
5.4.60.0070.07016.34
5.4.50.0030.04716.22
5.4.40.0070.03316.23
5.4.30.0100.05716.33
5.4.20.0100.07016.25
5.4.10.0030.04716.38
5.4.00.0030.04315.81
5.3.290.0070.08314.61
5.3.280.0070.05714.57
5.3.270.0030.04314.57
5.3.260.0100.04014.59
5.3.250.0000.04314.64
5.3.240.0030.04314.50
5.3.230.0030.07714.54
5.3.220.0030.04014.51
5.3.210.0100.07714.52
5.3.200.0130.05014.52
5.3.190.0100.07714.52
5.3.180.0070.08314.39
5.3.170.0100.07014.55
5.3.160.0030.06314.66
5.3.150.0100.03714.52
5.3.140.0000.05714.47
5.3.130.0170.06714.49
5.3.120.0070.05014.50
5.3.110.0100.06014.50
5.3.100.0100.07013.99
5.3.90.0030.04713.85
5.3.80.0030.07313.82
5.3.70.0070.07313.87
5.3.60.0030.05713.80
5.3.50.0100.03713.89
5.3.40.0130.06713.90
5.3.30.0100.07013.85
5.3.20.0100.05313.66
5.3.10.0070.07713.60
5.3.00.0100.05313.49
5.2.170.0000.06711.02
5.2.160.0030.06311.02
5.2.150.0070.05310.98
5.2.140.0070.05711.32
5.2.130.0070.02311.13
5.2.120.0030.03311.00
5.2.110.0070.02710.93
5.2.100.0030.06711.11
5.2.90.0000.04011.22
5.2.80.0100.03311.01
5.2.70.0030.06311.09
5.2.60.0030.04010.89
5.2.50.0030.05310.86
5.2.40.0030.06311.10
5.2.30.0000.03710.91
5.2.20.0030.05010.93
5.2.10.0170.05010.82
5.2.00.0070.03710.73
5.1.60.0030.04710.16
5.1.50.0070.0309.99
5.1.40.0070.03310.05
5.1.30.0070.04010.50
5.1.20.0030.04010.41
5.1.10.0000.03010.08
5.1.00.0000.05710.10
5.0.50.0030.0208.47
5.0.40.0070.0178.42
5.0.30.0030.0338.15
5.0.20.0070.0408.36
5.0.10.0030.0478.09
5.0.00.0030.0678.23
4.4.90.0030.0377.77
4.4.80.0000.0277.77
4.4.70.0100.0207.77
4.4.60.0000.0337.77
4.4.50.0130.0307.77
4.4.40.0000.0407.77
4.4.30.0030.0377.77
4.4.20.0000.0337.77
4.4.10.0030.0377.77
4.4.00.0070.0537.77
4.3.110.0070.0277.77
4.3.100.0070.0137.77
4.3.90.0000.0277.77
4.3.80.0070.0477.77
4.3.70.0030.0307.77
4.3.60.0000.0277.77
4.3.50.0070.0237.77
4.3.40.0030.0537.77
4.3.30.0000.0177.77
4.3.20.0000.0177.77
4.3.10.0000.0177.77
4.3.00.0030.0277.77

preferences:
51.77 ms | 401 KiB | 5 Q