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*\((?Nametype.*)/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.0090.00618.43
8.3.50.0130.00522.11
8.3.40.0150.00019.06
8.3.30.0120.00318.75
8.3.20.0030.00619.03
8.3.10.0060.00320.78
8.3.00.0070.00419.51
8.2.180.0070.01016.88
8.2.170.0070.00722.96
8.2.160.0070.01022.21
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0080.00026.16
8.2.120.0090.00019.89
8.2.110.0040.00720.99
8.2.100.0060.00618.00
8.2.90.0040.00419.14
8.2.80.0000.00918.04
8.2.70.0100.00217.75
8.2.60.0060.00318.03
8.2.50.0050.00318.07
8.2.40.0030.00518.16
8.2.30.0000.00819.76
8.2.20.0050.00217.70
8.2.10.0000.00817.79
8.2.00.0080.00017.78
8.1.280.0040.01425.92
8.1.270.0110.00623.99
8.1.260.0090.00026.35
8.1.250.0060.00328.09
8.1.240.0030.00620.74
8.1.230.0060.00620.97
8.1.220.0080.00018.77
8.1.210.0040.00418.83
8.1.200.0060.00317.35
8.1.190.0070.00017.50
8.1.180.0040.00418.10
8.1.170.0040.00418.86
8.1.160.0000.00818.81
8.1.150.0030.00618.74
8.1.140.0050.00217.61
8.1.130.0030.00317.93
8.1.120.0040.00317.56
8.1.110.0050.00317.45
8.1.100.0040.00417.46
8.1.90.0000.00717.47
8.1.80.0000.00817.45
8.1.70.0040.00417.45
8.1.60.0030.00617.69
8.1.50.0060.00317.60
8.1.40.0040.00417.63
8.1.30.0040.00417.63
8.1.20.0040.00417.75
8.1.10.0080.00017.68
8.1.00.0040.00417.67
8.0.300.0040.00420.02
8.0.290.0040.00417.00
8.0.280.0040.00418.39
8.0.270.0030.00317.34
8.0.260.0030.00516.96
8.0.250.0050.00217.14
8.0.240.0070.00317.14
8.0.230.0040.00417.04
8.0.220.0000.00717.05
8.0.210.0030.00316.96
8.0.200.0000.00717.01
8.0.190.0040.00417.08
8.0.180.0050.00317.10
8.0.170.0000.01016.94
8.0.160.0030.00616.99
8.0.150.0030.00616.89
8.0.140.0040.00417.04
8.0.130.0050.00013.42
8.0.120.0080.00016.92
8.0.110.0060.00317.01
8.0.100.0040.00417.05
8.0.90.0040.00417.10
8.0.80.0060.00917.03
8.0.70.0000.00716.95
8.0.60.0030.00517.03
8.0.50.0040.00416.93
8.0.30.0070.01217.13
8.0.20.0090.00917.49
8.0.10.0000.00817.15
8.0.00.0120.00616.93
7.4.330.0020.00215.03
7.4.320.0060.00016.72
7.4.300.0000.00716.68
7.4.290.0040.00416.69
7.4.280.0030.00516.66
7.4.270.0000.00716.75
7.4.260.0030.00313.43
7.4.250.0030.00616.69
7.4.240.0000.00716.73
7.4.230.0070.00016.56
7.4.220.0060.01916.66
7.4.210.0050.01116.68
7.4.200.0040.00416.66
7.4.190.0070.00016.91
7.4.160.0060.00916.77
7.4.150.0110.00717.40
7.4.140.0100.01017.23
7.4.130.0090.00816.76
7.4.120.0080.00916.75
7.4.110.0060.01216.64
7.4.100.0130.01016.77
7.4.90.0110.00716.84
7.4.80.0150.00719.03
7.4.70.0070.01116.83
7.4.60.0120.00316.66
7.4.50.0060.00016.54
7.4.40.0040.01522.27
7.4.30.0040.01816.61
7.4.10.0040.01114.95
7.4.00.0100.00714.98
7.3.330.0000.00513.11
7.3.320.0000.00613.16
7.3.310.0030.00316.44
7.3.300.0040.00416.34
7.3.290.0120.00616.36
7.3.280.0040.01316.36
7.3.270.0110.00617.40
7.3.260.0080.01018.24
7.3.250.0140.00816.47
7.3.240.0100.00616.69
7.3.230.0070.01016.54
7.3.210.0150.00616.44
7.3.200.0060.01019.39
7.3.190.0190.00616.48
7.3.180.0040.01516.42
7.3.170.0130.01016.42
7.3.160.0080.00816.47
7.3.130.0000.01415.11
7.3.120.0020.01414.86
7.3.110.0070.01015.17
7.3.100.0080.00615.00
7.3.90.0080.00515.01
7.3.80.0020.00714.91
7.3.70.0060.00514.90
7.3.60.0110.00515.03
7.3.50.0040.00914.76
7.3.40.0030.01014.70
7.3.30.0080.00914.82
7.3.20.0040.00816.60
7.3.10.0060.00716.74
7.3.00.0050.01016.52
7.2.330.0060.01216.77
7.2.320.0070.01016.52
7.2.310.0070.01516.67
7.2.300.0030.01516.66
7.2.290.0030.01216.63
7.2.260.0120.00314.82
7.2.250.0090.00815.04
7.2.240.0050.01214.98
7.2.230.0040.00914.86
7.2.220.0050.00714.83
7.2.210.0100.00514.94
7.2.200.0050.00814.94
7.2.190.0020.01115.11
7.2.180.0090.00815.13
7.2.170.0030.01015.13
7.2.160.0120.00314.98
7.2.150.0070.00716.97
7.2.140.0030.00716.96
7.2.130.0090.00616.98
7.2.120.0070.00717.11
7.2.110.0070.00816.98
7.2.100.0040.01116.87
7.2.90.0070.00816.99
7.2.80.0080.00516.93
7.2.70.0070.00916.87
7.2.60.0080.00517.06
7.2.50.0050.00716.77
7.2.40.0080.00616.97
7.2.30.0070.00616.94
7.2.20.0110.00216.89
7.2.10.0090.00716.86
7.2.00.0020.01117.89
7.1.330.0020.01115.90
7.1.320.0020.01016.03
7.1.310.0050.00915.88
7.1.300.0070.00715.94
7.1.290.0080.00515.97
7.1.280.0030.01015.80
7.1.270.0020.01215.93
7.1.260.0060.00515.95
7.1.250.0030.00715.79
7.1.240.0080.00315.90
7.1.230.0060.00815.68
7.1.220.0000.01515.78
7.1.210.0030.01015.93
7.1.200.0060.00315.91
7.1.190.0060.00915.87
7.1.180.0000.01815.73
7.1.170.0080.00015.93
7.1.160.0110.00415.71
7.1.150.0090.00315.81
7.1.140.0080.00515.96
7.1.130.0040.00416.07
7.1.120.0000.01215.95
7.1.110.0140.00015.56
7.1.100.0030.00917.22
7.1.90.0040.00815.93
7.1.80.0100.00716.03
7.1.70.0070.01116.71
7.1.60.0100.00316.57
7.1.50.0080.00616.39
7.1.40.0030.01015.86
7.1.30.0040.01215.76
7.1.20.0060.00615.74
7.1.10.0000.01015.97
7.1.00.0080.03218.95
7.0.330.0030.01315.37
7.0.320.0000.00815.43
7.0.310.0040.01215.21
7.0.300.0000.01015.32
7.0.290.0110.00015.50
7.0.280.0060.00615.40
7.0.270.0060.00615.47
7.0.260.0070.00715.13
7.0.250.0060.00615.42
7.0.240.0060.00615.68
7.0.230.0030.01015.58
7.0.220.0000.01015.62
7.0.210.0000.01115.49
7.0.200.0030.01316.18
7.0.190.0030.01015.09
7.0.180.0100.00315.51
7.0.170.0060.00615.72
7.0.160.0000.01115.68
7.0.150.0040.01115.34
7.0.140.0030.03918.74
7.0.130.0030.00615.64
7.0.120.0000.01415.33
7.0.110.0050.03917.74
7.0.100.0020.05017.69
7.0.90.0060.04917.58
7.0.80.0120.04017.63
7.0.70.0070.04217.80
7.0.60.0120.03217.84
7.0.50.0070.04117.83
7.0.40.0080.04616.75
7.0.30.0130.04016.54
7.0.20.0080.04116.74
7.0.10.0120.03716.61
7.0.00.0030.02916.63
5.6.400.0110.00414.28
5.6.390.0100.00713.99
5.6.380.0130.00014.62
5.6.370.0070.01014.38
5.6.360.0030.01214.36
5.6.350.0000.01114.26
5.6.340.0030.01314.32
5.6.330.0080.00614.47
5.6.320.0030.01014.35
5.6.310.0040.01114.39
5.6.300.0030.01013.99
5.6.290.0060.00914.45
5.6.280.0090.03517.76
5.6.270.0070.00714.48
5.6.260.0070.04517.64
5.6.250.0090.02817.46
5.6.240.0080.04017.47
5.6.230.0030.04317.45
5.6.220.0050.04517.56
5.6.210.0070.04217.54
5.6.200.0050.05117.59
5.6.190.0060.03117.40
5.6.180.0140.03517.50
5.6.170.0060.04017.45
5.6.160.0100.04317.46
5.6.150.0080.04517.50
5.6.140.0050.04817.51
5.6.130.0060.02417.44
5.6.120.0080.04517.40
5.6.110.0060.04617.34
5.6.100.0030.05017.47
5.6.90.0110.04217.45
5.6.80.0080.04517.24
5.6.70.0070.03017.01
5.6.60.0080.04417.05
5.6.50.0050.04317.14
5.6.40.0070.04317.30
5.6.30.0080.04517.31
5.6.20.0030.04917.31
5.6.10.0070.04216.97
5.6.00.0060.04417.06
5.5.380.0090.04317.29
5.5.370.0090.03517.32
5.5.360.0030.05017.38
5.5.350.0080.03317.42
5.5.340.0060.03317.85
5.5.330.0050.04517.52
5.5.320.0030.05117.50
5.5.310.0000.03417.64
5.5.300.0100.04017.64
5.5.290.0070.03917.52
5.5.280.0080.04317.72
5.5.270.0050.04917.44
5.5.260.0050.04717.45
5.5.250.0060.04617.27
5.5.240.0030.04517.13
5.5.230.0100.04417.37
5.5.220.0080.04017.28
5.5.210.0030.04517.14
5.5.200.0030.05017.16
5.5.190.0080.03617.24
5.5.180.0120.03817.22
5.5.170.0030.01313.90
5.5.160.0060.04517.20
5.5.150.0080.04317.32
5.5.140.0070.04717.04
5.5.130.0120.04117.33
5.5.120.0080.04517.12
5.5.110.0080.04317.08
5.5.100.0080.05617.10
5.5.90.0090.04017.19
5.5.80.0120.03717.12
5.5.70.0070.04617.09
5.5.60.0080.04317.24
5.5.50.0070.04417.23
5.5.40.0080.04317.06
5.5.30.0040.03217.07
5.5.20.0050.04717.13
5.5.10.0050.04317.12
5.5.00.0100.04117.09
5.4.450.0120.03916.24
5.4.440.0120.04016.12
5.4.430.0070.04216.09
5.4.420.0070.04116.16
5.4.410.0050.04016.02
5.4.400.0030.04616.03
5.4.390.0080.04315.93
5.4.380.0070.03716.05
5.4.370.0080.03715.91
5.4.360.0070.04115.99
5.4.350.0020.04315.95
5.4.340.0080.03815.93
5.4.330.0060.00312.90
5.4.320.0090.03916.04
5.4.310.0050.04216.04
5.4.300.0070.04215.96
5.4.290.0080.02516.07
5.4.280.0000.04716.03
5.4.270.0070.04215.90
5.4.260.0070.04015.94
5.4.250.0050.03715.95
5.4.240.0040.04116.03
5.4.230.0070.04316.03
5.4.220.0080.02616.02
5.4.210.0070.04215.96
5.4.200.0030.02716.03
5.4.190.0070.04216.00
5.4.180.0080.03715.92
5.4.170.0050.04416.00
5.4.160.0050.04316.04
5.4.150.0050.03815.91
5.4.140.0050.04314.67
5.4.130.0060.03914.72
5.4.120.0050.03914.73
5.4.110.0060.03314.54
5.4.100.0070.03714.70
5.4.90.0020.04814.66
5.4.80.0050.03814.56
5.4.70.0020.04214.63
5.4.60.0050.03814.70
5.4.50.0050.04014.68
5.4.40.0070.02314.53
5.4.30.0100.03514.66
5.4.20.0020.03914.54
5.4.10.0100.03814.69
5.4.00.0080.03714.41
5.3.290.0050.04313.82
5.3.280.0080.04213.73
5.3.270.0070.04213.71
5.3.260.0100.04313.71
5.3.250.0070.04313.79
5.3.240.0090.04013.72
5.3.230.0120.03613.68
5.3.220.0160.03213.67
5.3.210.0070.03513.63
5.3.200.0120.03813.78
5.3.190.0050.04813.65
5.3.180.0130.03413.67
5.3.170.0090.02413.75
5.3.160.0100.03813.70
5.3.150.0150.03513.74
5.3.140.0090.03913.67
5.3.130.0120.02613.76
5.3.120.0140.03313.67
5.3.110.0100.04013.70
5.3.100.0060.04313.44
5.3.90.0030.04213.36
5.3.80.0050.04213.52
5.3.70.0110.03313.43
5.3.60.0070.04413.43
5.3.50.0070.03913.40
5.3.40.0100.03613.44
5.3.30.0060.03913.38
5.3.20.0050.04113.31
5.3.10.0060.03913.22
5.3.00.0060.03513.21
5.2.170.0100.06011.80
5.2.160.0070.05311.80
5.2.150.0030.05011.80
5.2.140.0000.06311.80
5.2.130.0030.06711.80
5.2.120.0070.06011.80
5.2.110.0000.06711.80
5.2.100.0030.05711.80
5.2.90.0030.03311.80
5.2.80.0100.06311.80
5.2.70.0130.05711.80
5.2.60.0070.06011.80
5.2.50.0030.05011.80
5.2.40.0070.06011.80
5.2.30.0000.06311.80
5.2.20.0070.03711.80
5.2.10.0100.05311.80
5.2.00.0100.05711.80
5.1.60.0000.05311.80
5.1.50.0030.05711.80
5.1.40.0100.03011.80
5.1.30.0070.05711.80
5.1.20.0000.05011.80
5.1.10.0070.05711.80
5.1.00.0000.05711.80
5.0.50.0100.04011.80
5.0.40.0030.04311.80
5.0.30.0030.06311.80
5.0.20.0000.04711.80
5.0.10.0070.03711.80
5.0.00.0000.06711.80
4.4.90.0000.03011.80
4.4.80.0030.03011.80
4.4.70.0000.03711.80
4.4.60.0000.03711.80
4.4.50.0070.03311.80
4.4.40.0030.05711.80
4.4.30.0070.03311.80
4.4.20.0070.02711.80
4.4.10.0000.02311.80
4.4.00.0000.05711.80
4.3.110.0030.03011.80
4.3.100.0000.03711.80
4.3.90.0070.03011.80
4.3.80.0000.05311.80
4.3.70.0130.02311.80
4.3.60.0030.03311.80
4.3.50.0030.03311.80
4.3.40.0070.04011.80
4.3.30.0000.04011.80
4.3.20.0030.03311.80
4.3.10.0000.03711.80
4.3.00.0030.03311.80

preferences:
47.1 ms | 401 KiB | 5 Q