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, $position), $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.40.0090.00618.96
8.3.30.0120.00918.96
8.3.20.0080.00020.21
8.3.10.0030.00522.09
8.3.00.0070.01022.37
8.2.170.0070.00722.96
8.2.160.0110.00721.12
8.2.150.0050.00324.18
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0080.00019.74
8.2.110.0110.00021.20
8.2.100.0040.00817.97
8.2.90.0040.00419.28
8.2.80.0080.00017.97
8.2.70.0000.00817.75
8.2.60.0060.00318.04
8.2.50.0050.00318.07
8.2.40.0040.00418.16
8.2.30.0050.00318.17
8.2.20.0040.00417.84
8.2.10.0050.00217.85
8.2.00.0000.00817.85
8.1.270.0080.00022.31
8.1.260.0000.00926.35
8.1.250.0040.00428.09
8.1.240.0060.00321.33
8.1.230.0070.00417.51
8.1.220.0030.00617.74
8.1.210.0080.00018.77
8.1.200.0030.00617.60
8.1.190.0050.00517.36
8.1.180.0000.00818.10
8.1.170.0030.00618.70
8.1.160.0000.00722.00
8.1.150.0040.00418.72
8.1.140.0070.00017.58
8.1.130.0000.00817.79
8.1.120.0000.00717.51
8.1.110.0040.00417.48
8.1.100.0000.00817.47
8.1.90.0030.00617.57
8.1.80.0040.00417.59
8.1.70.0000.00717.59
8.1.60.0030.00617.67
8.1.50.0030.00617.68
8.1.40.0080.00017.51
8.1.30.0040.00417.75
8.1.20.0100.00017.65
8.1.10.0040.00417.73
8.1.00.0000.00817.62
8.0.300.0000.00818.77
8.0.290.0040.00417.00
8.0.280.0000.00718.49
8.0.270.0040.00417.31
8.0.260.0000.00717.05
8.0.250.0000.00717.11
8.0.240.0000.00717.06
8.0.230.0000.00716.98
8.0.220.0030.00317.08
8.0.210.0070.00017.13
8.0.200.0030.00317.12
8.0.190.0050.00317.19
8.0.180.0090.00016.97
8.0.170.0000.00716.98
8.0.160.0040.00417.00
8.0.150.0000.00717.04
8.0.140.0070.00017.06
8.0.130.0030.00313.49
8.0.120.0030.00516.90
8.0.110.0040.00417.07
8.0.100.0040.00417.09
8.0.90.0050.00217.11
8.0.80.0070.01017.06
8.0.70.0050.00216.93
8.0.60.0050.00317.01
8.0.50.0040.00416.88
8.0.30.0100.01617.33
8.0.20.0130.00917.40
8.0.10.0000.00717.13
8.0.00.0070.01317.03
7.4.330.0020.00215.00
7.4.320.0060.00016.60
7.4.300.0040.00416.75
7.4.290.0050.00216.59
7.4.280.0000.00816.74
7.4.270.0000.00716.63
7.4.260.0000.00716.70
7.4.250.0000.00816.76
7.4.240.0020.00516.81
7.4.230.0030.00316.71
7.4.220.0070.01116.75
7.4.210.0110.00316.73
7.4.200.0040.00416.60
7.4.190.0040.00416.64
7.4.160.0070.01016.80
7.4.150.0060.01517.40
7.4.140.0090.01017.86
7.4.130.0120.00716.76
7.4.120.0110.00616.65
7.4.110.0100.00716.59
7.4.100.0100.00716.66
7.4.90.0090.00916.95
7.4.80.0070.01519.39
7.4.70.0080.00816.64
7.4.60.0140.00516.77
7.4.50.0000.00916.75
7.4.40.0090.00922.77
7.4.30.0000.01616.73
7.4.10.0030.01615.32
7.4.00.0030.01315.13
7.3.330.0000.00613.11
7.3.320.0000.00613.11
7.3.310.0000.00716.44
7.3.300.0040.00416.36
7.3.290.0090.00616.41
7.3.280.0050.01216.34
7.3.270.0140.00417.40
7.3.260.0060.01116.37
7.3.250.0100.00816.63
7.3.240.0000.01716.58
7.3.230.0100.00716.39
7.3.210.0120.00616.54
7.3.200.0080.01319.39
7.3.190.0080.01516.31
7.3.180.0090.00916.48
7.3.170.0030.01316.56
7.3.160.0060.01216.72
7.3.130.0060.00615.23
7.3.120.0080.01014.85
7.3.110.0060.00914.74
7.3.100.0000.01214.59
7.3.90.0000.01415.07
7.3.80.0070.00315.00
7.3.70.0080.00414.50
7.3.60.0040.00814.84
7.3.50.0090.00614.88
7.3.40.0030.01315.04
7.3.30.0120.00014.99
7.3.20.0080.00816.90
7.3.10.0040.01216.82
7.3.00.0070.00916.67
7.2.330.0080.00816.72
7.2.320.0030.01616.61
7.2.310.0100.00716.71
7.2.300.0080.00816.71
7.2.290.0070.01016.63
7.2.260.0060.01315.09
7.2.250.0070.01115.14
7.2.240.0030.00914.98
7.2.230.0090.00915.18
7.2.220.0040.01415.02
7.2.210.0000.01115.31
7.2.200.0100.00015.01
7.2.190.0040.01115.11
7.2.180.0070.01014.70
7.2.170.0000.01614.97
7.2.160.0070.00715.09
7.2.150.0060.00916.96
7.2.140.0120.00317.04
7.2.130.0060.00817.05
7.2.120.0090.00516.83
7.2.110.0050.00916.92
7.2.100.0070.00717.00
7.2.90.0090.00616.92
7.2.80.0050.01116.91
7.2.70.0090.00216.99
7.2.60.0050.00816.81
7.2.50.0060.00816.94
7.2.40.0080.00616.94
7.2.30.0090.00517.11
7.2.20.0070.00916.93
7.2.10.0030.00616.89
7.2.00.0060.00817.72
7.1.330.0070.00715.95
7.1.320.0100.00715.83
7.1.310.0070.00715.81
7.1.300.0070.00315.98
7.1.290.0000.01515.85
7.1.280.0000.00915.78
7.1.270.0000.01215.88
7.1.260.0000.01015.97
7.1.250.0070.00815.79
7.1.240.0060.00615.74
7.1.230.0060.00915.90
7.1.220.0000.01115.77
7.1.210.0030.01215.83
7.1.200.0030.01015.84
7.1.190.0020.01015.93
7.1.180.0080.00715.76
7.1.170.0080.00615.87
7.1.160.0030.00815.92
7.1.150.0080.00515.94
7.1.140.0090.00315.84
7.1.130.0070.00815.75
7.1.120.0050.01015.95
7.1.110.0050.00815.76
7.1.100.0080.00716.74
7.1.90.0050.00715.90
7.1.80.0070.00715.94
7.1.70.0060.00616.49
7.1.60.0100.00817.16
7.1.50.0090.00616.29
7.1.40.0040.01215.85
7.1.30.0080.00715.72
7.1.20.0020.01215.87
7.1.10.0030.00815.68
7.1.00.0040.03218.05
7.0.330.0050.00915.39
7.0.320.0050.00815.32
7.0.310.0060.00615.65
7.0.300.0050.00515.29
7.0.290.0030.01015.33
7.0.280.0050.00815.43
7.0.270.0070.00615.51
7.0.260.0040.00915.33
7.0.250.0030.01115.54
7.0.240.0020.01115.45
7.0.230.0060.00815.46
7.0.220.0090.00515.48
7.0.210.0060.00815.66
7.0.200.0090.00215.78
7.0.190.0060.00615.59
7.0.180.0040.01215.29
7.0.170.0020.01415.50
7.0.160.0050.00815.59
7.0.150.0040.01015.39
7.0.140.0020.03117.58
7.0.130.0090.00715.54
7.0.120.0020.01215.62
7.0.110.0040.00615.42
7.0.100.0090.00515.60
7.0.90.0090.00515.39
7.0.80.0050.00515.23
7.0.70.0050.00615.48
7.0.60.0050.01516.92
7.0.50.0060.02116.32
7.0.40.0040.02715.78
7.0.30.0120.03115.68
7.0.20.0130.03115.82
7.0.10.0140.02915.84
7.0.00.0070.03315.83
5.6.400.0040.00414.54
5.6.390.0060.00614.18
5.6.380.0050.00714.58
5.6.370.0100.00414.42
5.6.360.0070.00714.22
5.6.350.0110.00314.16
5.6.340.0040.01014.47
5.6.330.0080.00814.58
5.6.320.0050.00914.39
5.6.310.0030.00814.29
5.6.300.0040.00814.32
5.6.290.0060.00714.36
5.6.280.0080.02716.44
5.6.270.0090.00414.43
5.6.260.0030.00714.45
5.6.250.0030.00914.60
5.6.240.0030.00714.50
5.6.230.0050.01014.24
5.6.220.0030.01014.32
5.6.210.0060.03316.41
5.6.200.0060.03315.57
5.6.190.0090.02816.29
5.6.180.1360.02216.48
5.6.170.0150.02716.47
5.6.160.0020.03516.37
5.6.150.0020.03215.56
5.6.140.0060.01915.58
5.6.130.0080.02815.62
5.6.120.0070.03016.65
5.6.110.0060.03316.55
5.6.100.0020.03516.62
5.6.90.0040.03416.45
5.6.80.0070.03116.48
5.6.70.0060.00814.04
5.6.60.0000.01514.26
5.6.50.0080.00614.16
5.6.40.0020.00814.28
5.6.30.0070.00714.34
5.6.20.0060.00914.31
5.6.10.0080.00614.22
5.6.00.0070.00514.27
5.5.380.0070.00312.72
5.5.370.0070.00412.67
5.5.360.0010.01112.82
5.5.350.0020.03315.32
5.5.340.0030.01814.52
5.5.330.0060.01815.35
5.5.320.0100.03315.41
5.5.310.0060.02515.39
5.5.300.0110.01814.49
5.5.290.0060.03214.54
5.5.280.0040.02115.45
5.5.270.0060.02115.53
5.5.260.0070.02915.42
5.5.250.0060.03115.28
5.5.240.0040.02915.09
5.5.230.0070.00512.61
5.5.220.0030.00512.60
5.5.210.0070.00712.60
5.5.200.0060.00612.74
5.5.190.0060.00812.65
5.5.180.0080.00612.62
5.5.170.0100.00312.78
5.5.160.0030.00612.76
5.5.150.0060.00512.70
5.5.140.0050.00612.59
5.5.130.0050.00712.71
5.5.120.0060.00612.68
5.5.110.0030.01012.71
5.5.100.0050.00612.50
5.5.90.0050.01012.61
5.5.80.0020.00912.67
5.5.70.0030.00612.66
5.5.60.0030.01212.69
5.5.50.0010.01312.47
5.5.40.0080.00512.67
5.5.30.0040.00912.61
5.5.20.0050.00712.78
5.5.10.0020.01412.64
5.5.00.0050.01112.47
5.4.450.0140.01514.54
5.4.440.0090.02414.48
5.4.430.0090.03114.53
5.4.420.0090.03314.54
5.4.410.0100.02914.43
5.4.400.0100.01914.46
5.4.390.0120.02914.41
5.4.380.0120.02714.46
5.4.370.0140.01614.40
5.4.360.0090.02914.33
5.4.350.0120.02414.41
5.4.340.0090.01714.41
5.4.330.0050.00612.07
5.4.320.0080.02614.41
5.4.310.0110.02414.45
5.4.300.0090.02914.37
5.4.290.0100.02914.47
5.4.280.0120.02014.36
5.4.270.0140.02614.33
5.4.260.0090.01814.41
5.4.250.0100.02414.48
5.4.240.0090.02214.37
5.4.230.0100.03014.40
5.4.220.0160.02214.34
5.4.210.0120.01714.43
5.4.200.0130.02714.45
5.4.190.0110.01814.43
5.4.180.0120.02714.38
5.4.170.0110.02814.33
5.4.160.0130.02814.40
5.4.150.0160.02414.48
5.4.140.0080.02313.50
5.4.130.0100.01613.55
5.4.120.0090.03013.50
5.4.110.0100.02713.58
5.4.100.0140.02313.53
5.4.90.0120.02913.56
5.4.80.0100.02813.49
5.4.70.0070.03013.54
5.4.60.0100.02613.51
5.4.50.0130.02413.44
5.4.40.0100.02113.56
5.4.30.0130.02613.49
5.4.20.0110.01813.50
5.4.10.0130.02513.55
5.4.00.0090.03013.42
5.3.290.0100.02512.93
5.3.280.0110.03012.88
5.3.270.0090.03112.95
5.3.260.0090.03012.89
5.3.250.0110.02212.92
5.3.240.0110.02712.89
5.3.230.0130.01512.97
5.3.220.0120.02712.88
5.3.210.0110.02512.91
5.3.200.0090.02412.93
5.3.190.0100.03012.91
5.3.180.0110.02612.87
5.3.170.0070.02112.91
5.3.160.0080.02912.91
5.3.150.0060.02412.88
5.3.140.0130.01412.88
5.3.130.0100.02612.87
5.3.120.0080.02212.90
5.3.110.0110.02812.90
5.3.100.0070.02712.70
5.3.90.0100.01512.74
5.3.80.0100.01412.77
5.3.70.0070.02012.69
5.3.60.0110.02312.72
5.3.50.0100.02212.71
5.3.40.0120.02712.67
5.3.30.0080.02712.66
5.3.20.0100.02912.62
5.3.10.0120.02512.64
5.3.00.0110.02612.62
5.2.170.0090.03312.44
5.2.160.0130.02912.44
5.2.150.0130.01712.44
5.2.140.0130.02812.44
5.2.130.0130.03012.44
5.2.120.0150.02312.44
5.2.110.0100.03412.44
5.2.100.0130.02812.44
5.2.90.0120.02912.44
5.2.80.0130.02212.44
5.2.70.0110.01812.44
5.2.60.0110.03212.44
5.2.50.0100.01812.44
5.2.40.0070.01712.44
5.2.30.0070.01812.44
5.2.20.0080.01512.44
5.2.10.0050.01912.44
5.2.00.0030.02112.44
5.1.60.0070.01412.44
5.1.50.0030.01612.44
5.1.40.0050.01412.44
5.1.30.0060.01312.44
5.1.20.0050.01512.44
5.1.10.0020.02012.44
5.1.00.0050.01712.44
5.0.50.0030.01312.44
5.0.40.0020.01712.44
5.0.30.0030.01812.44
5.0.20.0040.01212.44
5.0.10.0030.01312.44
5.0.00.0020.01912.44
4.4.90.0030.02112.44
4.4.80.0060.01112.44
4.4.70.0030.01012.44
4.4.60.0050.00812.44
4.4.50.0040.00812.44
4.4.40.0040.01612.44
4.4.30.0060.01012.44
4.4.20.0030.01012.44
4.4.10.0070.00712.44
4.4.00.0070.02012.44
4.3.110.0020.01212.44
4.3.100.0000.01212.44
4.3.90.0010.01012.44
4.3.80.0020.01512.44
4.3.70.0030.01012.44
4.3.60.0030.01012.44
4.3.50.0050.00712.44
4.3.40.0000.01612.44
4.3.30.0020.01012.44
4.3.20.0020.00912.44
4.3.10.0000.01112.44
4.3.00.0000.01112.44

preferences:
33.73 ms | 400 KiB | 5 Q