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 = $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.0140.00718.43
8.3.50.0070.01322.06
8.3.40.0140.00018.96
8.3.30.0040.01119.07
8.3.20.0080.00020.21
8.3.10.0040.00422.14
8.3.00.0070.00022.38
8.2.180.0110.00416.63
8.2.170.0070.00722.96
8.2.160.0140.00021.04
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0080.00018.00
8.2.110.0060.00322.16
8.2.100.0120.00018.16
8.2.90.0000.00819.18
8.2.80.0090.00019.89
8.2.70.0050.00517.88
8.2.60.0030.00617.93
8.2.50.0000.00918.07
8.2.40.0060.00318.34
8.2.30.0040.00418.08
8.2.20.0000.00817.82
8.2.10.0040.00417.94
8.2.00.0040.00417.90
8.1.280.0070.01425.92
8.1.270.0040.00422.16
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0000.00923.70
8.1.230.0120.00319.28
8.1.220.0000.00817.77
8.1.210.0080.00018.77
8.1.200.0030.00617.48
8.1.190.0050.00317.36
8.1.180.0040.00418.10
8.1.170.0050.00318.90
8.1.160.0040.00422.01
8.1.150.0040.00418.83
8.1.140.0000.00717.49
8.1.130.0030.00317.81
8.1.120.0050.00217.64
8.1.110.0040.00417.51
8.1.100.0050.00217.61
8.1.90.0040.00417.51
8.1.80.0040.00417.62
8.1.70.0040.00417.57
8.1.60.0000.00917.75
8.1.50.0050.00217.72
8.1.40.0000.00717.70
8.1.30.0000.00817.72
8.1.20.0030.00617.83
8.1.10.0080.00017.77
8.1.00.0050.00217.66
8.0.300.0040.00418.77
8.0.290.0040.00417.30
8.0.280.0070.00018.50
8.0.270.0000.00717.11
8.0.260.0040.00416.96
8.0.250.0030.00317.03
8.0.240.0000.00717.11
8.0.230.0000.00717.14
8.0.220.0070.00017.11
8.0.210.0000.00717.05
8.0.200.0030.00317.05
8.0.190.0000.00917.02
8.0.180.0070.00017.01
8.0.170.0000.00717.13
8.0.160.0000.00717.01
8.0.150.0000.00816.92
8.0.140.0040.00416.99
8.0.130.0050.00013.57
8.0.120.0000.00917.09
8.0.110.0040.00416.97
8.0.100.0040.00417.08
8.0.90.0050.00317.14
8.0.80.0090.00717.08
8.0.70.0020.00516.90
8.0.60.0070.00017.03
8.0.50.0000.00717.07
8.0.30.0070.01317.36
8.0.20.0110.00817.40
8.0.10.0000.00817.32
8.0.00.0070.01017.04
7.4.330.0030.00315.22
7.4.320.0000.00616.87
7.4.300.0040.00416.90
7.4.290.0030.00516.84
7.4.280.0030.00316.86
7.4.270.0040.00416.81
7.4.260.0000.00716.67
7.4.250.0000.00716.84
7.4.240.0020.00516.80
7.4.230.0070.00016.90
7.4.220.0140.01116.96
7.4.210.0120.00516.77
7.4.200.0070.00016.74
7.4.190.0070.00016.83
7.4.160.0120.00416.68
7.4.150.0120.00617.40
7.4.140.0100.01117.86
7.4.130.0110.00616.88
7.4.120.0090.00916.62
7.4.110.0060.01216.83
7.4.100.0150.01216.72
7.4.90.0100.00716.80
7.4.80.0070.01019.39
7.4.70.0130.00316.82
7.4.60.0130.00316.67
7.4.50.0040.00416.38
7.4.40.0130.00622.77
7.4.30.0080.00816.59
7.4.00.0030.01315.32
7.3.330.0020.00213.23
7.3.320.0060.00013.51
7.3.310.0070.00016.46
7.3.300.0000.00716.50
7.3.290.0100.01016.61
7.3.280.0130.00516.49
7.3.270.0140.00317.40
7.3.260.0170.00016.85
7.3.250.0090.00916.50
7.3.240.0100.01016.55
7.3.230.0130.00316.81
7.3.210.0030.01416.79
7.3.200.0140.00419.39
7.3.190.0070.01016.73
7.3.180.0070.00816.42
7.3.170.0100.00616.61
7.3.160.0040.01216.73
7.3.120.0070.01015.08
7.3.00.0030.01216.87
7.2.330.0070.01016.71
7.2.320.0160.00616.66
7.2.310.0030.01816.64
7.2.300.0040.01816.91
7.2.290.0060.01216.92
7.2.130.0070.01017.20
7.2.120.0070.00716.82
7.2.110.0120.00316.56
7.2.100.0110.00816.50
7.2.90.0040.01116.86
7.2.80.0130.00317.00
7.2.70.0000.01417.07
7.2.60.0100.00317.09
7.2.50.0080.00417.09
7.2.40.0070.00717.24
7.2.30.0000.01517.25
7.2.20.0040.00717.01
7.2.10.0090.00317.24
7.2.00.0070.00818.36
7.1.250.0090.00915.80
7.1.240.0060.00315.99
7.1.230.0100.00315.64
7.1.220.0110.00015.94
7.1.210.0070.00715.93
7.1.200.0100.00615.93
7.1.190.0070.00716.03
7.1.180.0000.01115.88
7.1.170.0100.00715.91
7.1.160.0140.00016.17
7.1.150.0030.00615.98
7.1.140.0050.00515.91
7.1.130.0040.00415.77
7.1.120.0030.01015.96
7.1.110.0030.01016.04
7.1.100.0050.00917.11
7.1.90.0060.00615.96
7.1.80.0100.00315.94
7.1.70.0030.00616.64
7.1.60.0120.00617.93
7.1.50.0100.00316.71
7.1.40.0030.01015.97
7.1.30.0070.00716.09
7.1.20.0030.01015.70
7.1.10.0060.00615.87
7.1.00.0050.04219.07
7.0.330.0060.00615.60
7.0.320.0030.01315.60
7.0.310.0100.00315.38
7.0.300.0090.00315.55
7.0.290.0050.00515.25
7.0.280.0040.00715.42
7.0.270.0040.01115.33
7.0.260.0050.00515.34
7.0.250.0110.00415.75
7.0.240.0060.00915.77
7.0.230.0110.00015.70
7.0.220.0000.01315.82
7.0.210.0000.01215.67
7.0.200.0080.00516.23
7.0.190.0040.00815.39
7.0.180.0060.00915.31
7.0.170.0030.00615.69
7.0.160.0070.00715.64
7.0.150.0000.01215.57
7.0.140.0100.03518.84
7.0.130.0000.01315.46
7.0.120.0090.00615.46
7.0.110.0110.00015.64
7.0.100.0000.01315.58
7.0.90.0000.00815.39
7.0.80.0040.00415.68
7.0.70.0060.00615.56
7.0.60.0050.04417.82
7.0.50.0060.03816.76
7.0.40.0100.04216.90
7.0.30.0170.05216.97
7.0.20.0180.04217.02
7.0.10.0130.02816.84
7.0.00.0070.04816.83
5.6.380.0140.00014.51
5.6.370.0070.00714.35
5.6.360.0120.00014.35
5.6.350.0060.01014.66
5.6.340.0070.00414.43
5.6.330.0080.00814.43
5.6.320.0080.00814.70
5.6.310.0040.00714.38
5.6.300.0050.00514.54
5.6.290.0030.00614.63
5.6.280.0100.03317.60
5.6.270.0060.00914.41
5.6.260.0070.00414.07
5.6.250.0030.00614.39
5.6.240.0080.00314.53
5.6.230.0030.01014.50
5.6.220.0040.00814.40
5.6.210.0070.04217.42
5.6.200.0070.02116.24
5.6.190.0100.04317.37
5.6.180.0160.03917.48
5.6.170.0170.04317.46
5.6.160.0030.02717.33
5.6.150.0060.02416.33
5.6.140.0050.02316.33
5.6.130.0040.03116.35
5.6.120.0100.03017.88
5.6.110.0050.04517.63
5.6.100.0050.03217.69
5.6.90.0000.02917.77
5.6.80.0080.03917.30
5.6.70.0200.03517.44
5.6.60.0130.00314.27
5.6.50.0070.00714.58
5.6.40.0070.00714.50
5.6.30.0070.00714.48
5.6.20.0000.01314.37
5.6.10.0030.00914.33
5.6.00.0030.01014.35
5.5.380.0050.00010.95
5.5.370.0040.00811.28
5.5.360.0090.00311.22
5.5.350.0180.03315.83
5.5.340.0070.03514.62
5.5.330.0080.03815.93
5.5.320.0150.04515.86
5.5.310.0170.04215.79
5.5.300.0070.02414.60
5.5.290.0020.04614.60
5.5.280.0150.03515.84
5.5.270.0060.03216.09
5.5.260.0070.04315.94
5.5.250.0060.04515.69
5.5.240.0130.03515.66
5.5.230.0000.00611.10
5.5.220.0040.00411.30
5.5.210.0030.00310.77
5.5.200.0090.00411.12
5.5.190.0050.00811.20
5.5.180.0040.00811.00
5.5.170.0060.00611.35
5.5.160.0000.00811.20
5.5.150.0040.00711.34
5.5.140.0000.01310.85
5.5.130.0040.00711.23
5.5.120.0040.00411.09
5.5.110.0030.00611.18
5.5.100.0040.00711.25
5.5.90.0000.01311.11
5.5.80.0070.00711.15
5.5.70.0030.00611.23
5.5.60.0070.00311.18
5.5.50.0100.00010.80
5.5.40.0060.00611.33
5.5.30.0030.00311.17
5.5.20.0070.00011.07
5.5.10.0030.01011.22
5.5.00.0060.00611.17
5.4.450.0400.03315.31
5.4.440.0330.03715.38
5.4.430.0070.03015.38
5.4.420.0080.02715.05
5.4.410.0020.03514.90
5.4.400.0080.02814.93
5.4.390.0020.03414.70
5.4.380.0170.03014.77
5.4.370.0110.02814.89
5.4.360.0150.02514.91
5.4.350.0070.03714.74
5.4.340.0110.03514.97
5.4.330.0060.00310.70
5.4.320.0020.02511.84
5.4.310.0040.02511.75
5.4.300.0040.02111.83
5.4.290.0100.01811.64
5.4.280.0060.02111.79
5.4.270.0100.02915.11
5.4.260.0100.02514.88
5.4.250.0070.03015.06
5.4.240.0050.03014.88
5.4.230.0080.03814.78
5.4.220.0090.02815.01
5.4.210.0050.03914.85
5.4.200.0090.03614.79
5.4.190.0090.03415.09
5.4.180.0090.02814.87
5.4.170.0070.03015.02
5.4.160.0150.02214.98
5.4.150.0090.02914.88
5.4.140.0030.03113.82
5.4.130.0110.02613.82
5.4.120.0100.02913.66
5.4.110.0030.03013.72
5.4.100.0050.02613.69
5.4.90.0120.02213.75
5.4.80.0060.03213.76
5.4.70.0050.02913.66
5.4.60.0050.02913.78
5.4.50.0070.03013.67
5.4.40.0100.02713.87
5.4.30.0070.03013.77
5.4.20.0070.02713.84
5.4.10.0100.02513.70
5.4.00.0090.03213.56
5.3.290.0020.02711.72
5.3.280.0050.02812.54
5.3.270.0120.03312.70
5.3.260.0070.03012.54
5.3.250.0080.03112.67
5.3.240.0050.02912.63
5.3.230.0100.02712.62
5.3.220.0110.02612.61
5.3.210.0070.03012.49
5.3.200.0070.02812.54
5.3.190.0040.03012.59
5.3.180.0030.03212.65
5.3.170.0050.03012.54
5.3.160.0050.02812.72
5.3.150.0070.03112.68
5.3.140.0090.02512.63
5.3.130.0030.04312.59
5.3.120.0050.03112.60
5.3.110.0080.03112.61
5.3.100.0030.02812.24
5.3.90.0040.03112.25
5.3.80.0100.02312.27
5.3.70.0130.02012.32
5.3.60.0020.04312.28
5.3.50.0070.02512.16
5.3.40.0050.03112.16
5.3.30.0050.02512.21
5.3.20.0100.03412.13
5.3.10.0080.02512.07
5.3.00.0100.02311.98
5.2.170.0070.02810.45
5.2.160.0080.02810.26
5.2.150.0050.02510.28
5.2.140.0080.02710.41
5.2.130.0050.02410.33
5.2.120.0060.02010.41
5.2.110.0030.02510.33
5.2.100.0050.02610.26
5.2.90.0080.02810.38
5.2.80.0060.02310.37
5.2.70.0020.02410.26
5.2.60.0060.02110.34
5.2.50.0060.02410.22
5.2.40.0040.02410.24
5.2.30.0020.02710.26
5.2.20.0020.02710.19
5.2.10.0070.02210.29
5.2.00.0100.01810.13
5.1.60.0080.0189.85
5.1.50.0010.0269.81
5.1.40.0050.0209.81
5.1.30.0100.0159.90
5.1.20.0070.0269.89
5.1.10.0050.0209.69
5.1.00.0050.0229.91
5.0.50.0050.0159.08
5.0.40.0050.0249.02
5.0.30.0050.0308.92
5.0.20.0030.0158.95
5.0.10.0000.0228.89
5.0.00.0020.0238.92
4.4.90.0000.0158.54
4.4.80.0000.0148.54
4.4.70.0040.0128.54
4.4.60.0020.0128.54
4.4.50.0030.0138.54
4.4.40.0050.0248.54
4.4.30.0020.0148.54
4.4.20.0050.0088.54
4.4.10.0020.0138.54
4.4.00.0050.0198.54
4.3.110.0000.0158.54
4.3.100.0000.0138.54
4.3.90.0050.0158.54
4.3.80.0050.0188.54
4.3.70.0050.0208.54
4.3.60.0020.0128.54
4.3.50.0020.0138.54
4.3.40.0000.0228.54
4.3.30.0030.0128.54
4.3.20.0030.0128.54
4.3.10.0010.0168.54
4.3.00.0080.00812.50

preferences:
37.52 ms | 401 KiB | 5 Q