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.60.0090.01218.30
8.3.50.0140.00822.13
8.3.40.0070.00719.09
8.3.30.0070.01119.23
8.3.20.0000.00820.38
8.3.10.0050.00222.09
8.3.00.0040.00422.33
8.2.180.0070.00716.75
8.2.170.0000.01422.96
8.2.160.0130.00721.24
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0000.00826.16
8.2.120.0030.00518.00
8.2.110.0030.00622.18
8.2.100.0090.00320.01
8.2.90.0040.00419.09
8.2.80.0050.00519.79
8.2.70.0030.00517.87
8.2.60.0040.00418.05
8.2.50.0080.00018.07
8.2.40.0060.00318.34
8.2.30.0000.00718.04
8.2.20.0000.00817.97
8.2.10.0040.00417.90
8.2.00.0080.00017.90
8.1.280.0080.00825.92
8.1.270.0080.00022.27
8.1.260.0000.00826.35
8.1.250.0050.00328.09
8.1.240.0060.00323.97
8.1.230.0040.00819.28
8.1.220.0080.00017.91
8.1.210.0050.00318.77
8.1.200.0070.00317.48
8.1.190.0000.00817.63
8.1.180.0030.00618.10
8.1.170.0030.00618.54
8.1.160.0000.00721.96
8.1.150.0070.00018.73
8.1.140.0000.00717.60
8.1.130.0080.00017.81
8.1.120.0000.00717.59
8.1.110.0040.00417.56
8.1.100.0040.00417.57
8.1.90.0000.00917.45
8.1.80.0050.00317.55
8.1.70.0040.00417.60
8.1.60.0060.00317.64
8.1.50.0000.00817.55
8.1.40.0000.00717.54
8.1.30.0040.00417.75
8.1.20.0030.00517.69
8.1.10.0000.00817.82
8.1.00.0040.00417.67
8.0.300.0050.00218.77
8.0.290.0040.00417.16
8.0.280.0000.00718.53
8.0.270.0000.00816.99
8.0.260.0000.00717.07
8.0.250.0000.00717.05
8.0.240.0000.00717.14
8.0.230.0000.00717.13
8.0.220.0030.00317.02
8.0.210.0030.00317.04
8.0.200.0030.00317.18
8.0.190.0000.00817.05
8.0.180.0040.00417.02
8.0.170.0040.00417.09
8.0.160.0040.00417.18
8.0.150.0030.00516.98
8.0.140.0040.00417.06
8.0.130.0060.00013.54
8.0.120.0060.00316.95
8.0.110.0040.00417.06
8.0.100.0000.00717.10
8.0.90.0030.00616.96
8.0.80.0060.00917.05
8.0.70.0040.00417.15
8.0.60.0030.00517.08
8.0.50.0000.00717.04
8.0.30.0100.01217.22
8.0.20.0070.01217.40
8.0.10.0040.00417.32
8.0.00.0110.00817.08
7.4.330.0000.00615.10
7.4.320.0050.00216.74
7.4.300.0070.00016.84
7.4.290.0040.00416.75
7.4.280.0040.00416.73
7.4.270.0030.00516.94
7.4.260.0080.00016.74
7.4.250.0020.00516.82
7.4.240.0060.00116.84
7.4.230.0040.00416.91
7.4.220.0120.00616.91
7.4.210.0070.00716.69
7.4.200.0040.00416.74
7.4.190.0050.00216.85
7.4.160.0030.01316.63
7.4.150.0090.00917.40
7.4.140.0140.00617.86
7.4.130.0090.01416.86
7.4.120.0100.00716.95
7.4.110.0060.01316.70
7.4.100.0100.00716.68
7.4.90.0160.00716.56
7.4.80.0060.01219.39
7.4.70.0030.01316.81
7.4.60.0140.00316.56
7.4.50.0020.00216.74
7.4.40.0070.00722.77
7.4.30.0060.01016.61
7.4.10.0130.00316.57
7.4.00.0080.00715.89
7.3.330.0000.00513.39
7.3.320.0050.00013.43
7.3.310.0000.00716.58
7.3.300.0030.00316.50
7.3.290.0120.00316.54
7.3.280.0110.00716.54
7.3.270.0100.00717.40
7.3.260.0030.01316.86
7.3.250.0090.00816.60
7.3.240.0100.00716.62
7.3.230.0040.01216.58
7.3.210.0140.00416.56
7.3.200.0030.01919.39
7.3.190.0130.00316.48
7.3.180.0080.00816.43
7.3.170.0030.01416.68
7.3.160.0080.00816.65
7.3.130.0030.01416.73
7.3.120.0080.00815.76
7.3.110.0150.00416.47
7.3.100.0160.00016.70
7.3.90.0100.00716.49
7.3.80.0040.01116.46
7.3.70.0030.00816.40
7.3.60.0090.00916.52
7.3.50.0030.01216.60
7.3.40.0090.00616.59
7.3.30.0070.00716.40
7.3.20.0100.00318.35
7.3.10.0040.01118.32
7.3.00.0040.00818.31
7.2.330.0090.00616.85
7.2.320.0060.01616.96
7.2.310.0120.00916.85
7.2.300.0110.00616.73
7.2.290.0070.01016.75
7.2.260.0070.01016.75
7.2.250.0070.01116.75
7.2.240.0060.00916.81
7.2.230.0080.00816.88
7.2.220.0070.00716.71
7.2.210.0030.01316.66
7.2.200.0060.00316.88
7.2.190.0030.01516.58
7.2.180.0100.00716.76
7.2.170.0110.00416.86
7.2.160.0070.01016.68
7.2.150.0120.00318.50
7.2.140.0070.00718.65
7.2.130.0000.01018.55
7.2.120.0060.01018.56
7.2.110.0110.00418.41
7.2.100.0090.00618.48
7.2.90.0060.00618.34
7.2.80.0080.00818.54
7.2.70.0000.01118.44
7.2.60.0040.00917.64
7.2.50.0050.01017.79
7.2.40.0030.01018.60
7.2.30.0070.00318.65
7.2.20.0160.00018.58
7.2.10.0030.01318.52
7.2.00.0030.00918.57
7.1.330.0060.00917.57
7.1.320.0090.00017.47
7.1.310.0060.00317.47
7.1.300.0060.00917.54
7.1.290.0040.01117.46
7.1.280.0080.00417.62
7.1.270.0060.00917.62
7.1.260.0060.00917.45
7.1.250.0060.00317.39
7.1.240.0090.00317.48
7.1.230.0000.01017.53
7.1.220.0060.00617.56
7.1.210.0100.00017.39
7.1.200.0090.00216.79
7.1.190.0000.01017.62
7.1.180.0090.00317.50
7.1.170.0040.01117.54
7.1.160.0060.00317.48
7.1.150.0000.01017.38
7.1.140.0120.00317.60
7.1.130.0000.01717.39
7.1.120.0040.00717.37
7.1.110.0030.01017.59
7.1.100.0060.00317.70
7.1.90.0000.00917.42
7.1.80.0000.01717.56
7.1.70.0000.01017.37
7.1.60.0110.00818.62
7.1.50.0040.01217.41
7.1.40.0040.00417.35
7.1.30.0000.01217.57
7.1.20.0060.00317.28
7.1.10.0060.00317.56
7.1.00.0020.04319.91
7.0.330.0030.00617.09
7.0.320.0130.00017.17
7.0.310.0040.01116.96
7.0.300.0000.01117.19
7.0.290.0040.01217.29
7.0.280.0040.00817.12
7.0.270.0030.00617.20
7.0.260.0060.00317.37
7.0.250.0030.00617.14
7.0.240.0060.00317.22
7.0.230.0000.01117.33
7.0.220.0040.01217.12
7.0.210.0000.01317.36
7.0.200.0040.00617.16
7.0.190.0090.00617.20
7.0.180.0040.00817.27
7.0.170.0060.00617.29
7.0.160.0060.00617.29
7.0.150.0090.00617.33
7.0.140.0080.03919.55
7.0.130.0080.00817.14
7.0.120.0060.01017.10
7.0.110.0060.01217.33
7.0.100.0170.03818.67
7.0.90.0130.04418.54
7.0.80.0050.04818.55
7.0.70.0080.04718.47
7.0.60.0030.04518.59
7.0.50.0070.04518.66
7.0.40.0060.04717.70
7.0.30.0070.05017.55
7.0.20.0100.04117.70
7.0.10.0120.02317.70
7.0.00.0100.04417.49
5.6.400.0030.01016.18
5.6.390.0040.01116.07
5.6.380.0060.00916.01
5.6.370.0060.00615.83
5.6.360.0000.01116.19
5.6.350.0070.00716.13
5.6.340.0040.01116.08
5.6.330.0060.00616.14
5.6.320.0090.00015.99
5.6.310.0030.01016.13
5.6.300.0060.00615.95
5.6.290.0030.01015.84
5.6.280.0050.04118.49
5.6.270.0090.00916.23
5.6.260.0120.00315.90
5.6.250.0080.04318.33
5.6.240.0080.04318.31
5.6.230.0100.02818.26
5.6.220.0070.03618.30
5.6.210.0070.05118.26
5.6.200.0090.04418.60
5.6.190.0040.04918.47
5.6.180.0070.04418.51
5.6.170.0030.04718.46
5.6.160.0110.04318.59
5.6.150.0120.04218.49
5.6.140.0050.04818.45
5.6.130.0050.04218.57
5.6.120.0050.05118.47
5.6.110.0070.04718.55
5.6.100.0070.04518.52
5.6.90.0070.03318.49
5.6.80.0060.04618.22
5.6.70.0050.03518.13
5.6.60.0070.03118.12
5.6.50.0080.03018.12
5.6.40.0080.02718.24
5.6.30.0050.04218.27
5.6.20.0100.02418.23
5.6.10.0140.03718.08
5.6.00.0100.02518.06
5.5.380.0140.04618.05
5.5.370.0090.05018.22
5.5.360.0090.05118.09
5.5.350.0130.04318.05
5.5.340.0160.04518.44
5.5.330.0060.03618.34
5.5.320.0130.04718.42
5.5.310.0150.04218.22
5.5.300.0110.04118.52
5.5.290.0090.03018.33
5.5.280.0100.04718.47
5.5.270.0100.04918.46
5.5.260.0140.04518.39
5.5.250.0090.04018.24
5.5.240.0080.04618.09
5.5.230.0100.04317.96
5.5.220.0060.03118.09
5.5.210.0160.03718.03
5.5.200.0130.03917.98
5.5.190.0090.05018.03
5.5.180.0150.04218.12
5.5.170.0130.00915.81
5.5.160.0070.05017.93
5.5.150.0170.02718.01
5.5.140.0110.02818.12
5.5.130.0130.04118.06
5.5.120.0140.04618.03
5.5.110.0130.04418.04
5.5.100.0070.03217.93
5.5.90.0090.04217.94
5.5.80.0100.03218.05
5.5.70.0110.04317.83
5.5.60.0080.04618.13
5.5.50.0150.03917.93
5.5.40.0100.03817.99
5.5.30.0050.02917.98
5.5.20.0070.04618.07
5.5.10.0160.03718.00
5.5.00.0130.04217.95
5.4.450.0120.04115.93
5.4.440.0110.03916.13
5.4.430.0130.04016.09
5.4.420.0100.03416.10
5.4.410.0070.02916.04
5.4.400.0110.04315.91
5.4.390.0120.03415.87
5.4.380.0120.02215.96
5.4.370.0130.02015.81
5.4.360.0090.04115.79
5.4.350.0170.02815.88
5.4.340.0110.04015.83
5.4.330.0090.00912.84
5.4.320.0120.02315.80
5.4.310.0050.04315.87
5.4.300.0140.03415.81
5.4.290.0080.04315.80
5.4.280.0110.04015.80
5.4.270.0110.03215.77
5.4.260.0100.02015.86
5.4.250.0110.03015.76
5.4.240.0070.03615.92
5.4.230.0070.04015.77
5.4.220.0110.03615.84
5.4.210.0110.03015.77
5.4.200.0100.04015.86
5.4.190.0050.04615.77
5.4.180.0120.04015.80
5.4.170.0060.03915.90
5.4.160.0120.02215.92
5.4.150.0120.03915.80
5.4.140.0120.03714.49
5.4.130.0060.04514.51
5.4.120.0040.03914.46
5.4.110.0090.04114.54
5.4.100.0080.04114.54
5.4.90.0080.04014.43
5.4.80.0060.02814.54
5.4.70.0090.03814.47
5.4.60.0090.02714.53
5.4.50.0040.04314.60
5.4.40.0080.03114.54
5.4.30.0070.04014.52
5.4.20.0090.04314.46
5.4.10.0070.03914.58
5.4.00.0090.03614.29
5.3.290.0060.04613.83
5.3.280.0090.04513.81
5.3.270.0110.03913.79
5.3.260.0110.03413.79
5.3.250.0090.04413.80
5.3.240.0030.03313.80
5.3.230.0090.04013.90
5.3.220.0060.04513.81
5.3.210.0090.04013.60
5.3.200.0090.03713.69
5.3.190.0060.03913.79
5.3.180.0090.04113.75
5.3.170.0100.04213.90
5.3.160.0090.03313.83
5.3.150.0090.02713.86
5.3.140.0130.03613.96
5.3.130.0150.02413.84
5.3.120.0050.04213.75
5.3.110.0080.03613.72
5.3.100.0060.02513.46
5.3.90.0080.04113.46
5.3.80.0080.03913.41
5.3.70.0080.03413.47
5.3.60.0100.03913.46
5.3.50.0080.02913.45
5.3.40.0140.03813.36
5.3.30.0100.03913.33
5.3.20.0060.04113.27
5.3.10.0100.03213.17
5.3.00.0050.04013.17
5.2.170.0030.03311.93
5.2.160.0000.04311.93
5.2.150.0070.02711.93
5.2.140.0070.06011.93
5.2.130.0070.05711.93
5.2.120.0000.03711.93
5.2.110.0000.04011.93
5.2.100.0030.03311.93
5.2.90.0070.04311.93
5.2.80.0030.06311.93
5.2.70.0100.06011.93
5.2.60.0100.05711.93
5.2.50.0100.04711.93
5.2.40.0030.06011.93
5.2.30.0030.04011.93
5.2.20.0030.06011.93
5.2.10.0000.06011.93
5.2.00.0030.06011.93
5.1.60.0100.02011.93
5.1.50.0100.04711.93
5.1.40.0070.05311.93
5.1.30.0030.03711.93
5.1.20.0070.05711.93
5.1.10.0070.05011.93
5.1.00.0100.05011.93
5.0.50.0000.05311.93
5.0.40.0100.01711.93
5.0.30.0000.06711.93
5.0.20.0030.04311.93
5.0.10.0030.04311.93
5.0.00.0030.03711.93
4.4.90.0000.04011.93
4.4.80.0030.03711.93
4.4.70.0070.03011.93
4.4.60.0000.01711.93
4.4.50.0070.01711.93
4.4.40.0000.05711.93
4.4.30.0130.02011.93
4.4.20.0070.03011.93
4.4.10.0000.03711.93
4.4.00.0030.05011.93
4.3.110.0070.03311.93
4.3.100.0000.03311.93
4.3.90.0000.02311.93
4.3.80.0030.05011.93
4.3.70.0000.03711.93
4.3.60.0000.03711.93
4.3.50.0000.03711.93
4.3.40.0030.05311.93
4.3.30.0070.02711.93
4.3.20.0030.03711.93
4.3.10.0070.02711.93
4.3.00.0000.04011.93

preferences:
46.13 ms | 401 KiB | 5 Q