3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = "0/1/2/3/4/5/6/7/8/9/a/b/c/d/e/f 0/1/2/3/4/5/6/7/8/9/a/b/c/d/e/f"; $lines = array($str); $results = array(); while ($line = array_shift($lines)) { if (preg_match("/(\w+)(?:\/\w+)+/ui", $line, $match, PREG_OFFSET_CAPTURE)) { list($string, $offset) = $match[1]; array_push($lines, sprintf("%s%s", substr($line, 0, $offset + strlen($string)), substr($line, $offset + strlen($match[0][0])) )); array_push($lines, sprintf("%s%s", substr($line, 0, $offset), substr($line, $offset + strlen($string) + 1) )); } else { $results[] = $line; } } print_r($results);

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.0030.01618.27
8.3.60.0070.01118.55
8.3.50.0090.01021.27
8.3.40.0090.00619.01
8.3.30.0110.00419.24
8.3.20.0040.00419.15
8.3.10.0000.00821.02
8.3.00.0000.00822.08
8.2.180.0060.01318.79
8.2.170.0100.00522.96
8.2.160.0040.01820.52
8.2.150.0080.00024.18
8.2.140.0060.00324.66
8.2.130.0040.00426.16
8.2.120.0080.00021.31
8.2.110.0030.00620.47
8.2.100.0070.00418.28
8.2.90.0040.00419.33
8.2.80.0030.00517.97
8.2.70.0080.00417.88
8.2.60.0070.00318.18
8.2.50.0000.00818.07
8.2.40.0030.00618.47
8.2.30.0040.00420.02
8.2.20.0080.00018.17
8.2.10.0090.00018.20
8.2.00.0000.00818.02
8.1.280.0150.00025.92
8.1.270.0030.00624.02
8.1.260.0070.01326.35
8.1.250.0080.00028.09
8.1.240.0030.00622.46
8.1.230.0110.00021.08
8.1.220.0030.00618.77
8.1.210.0040.00418.98
8.1.200.0000.01117.47
8.1.190.0000.00817.65
8.1.180.0060.00318.10
8.1.170.0050.00318.81
8.1.160.0040.00419.09
8.1.150.0000.00818.94
8.1.140.0000.00817.78
8.1.130.0030.00317.91
8.1.120.0040.00417.64
8.1.110.0000.00817.65
8.1.100.0040.00417.82
8.1.90.0000.00817.83
8.1.80.0040.00417.59
8.1.70.0060.00317.73
8.1.60.0000.00817.86
8.1.50.0030.00517.75
8.1.40.0030.00617.89
8.1.30.0040.00417.91
8.1.20.0090.00017.89
8.1.10.0040.00417.84
8.1.00.0000.01117.80
8.0.300.0040.00419.97
8.0.290.0040.00417.30
8.0.280.0050.00318.66
8.0.270.0050.00217.40
8.0.260.0030.00317.12
8.0.250.0000.00817.25
8.0.240.0030.00817.26
8.0.230.0040.00417.25
8.0.220.0040.00417.29
8.0.210.0000.00717.21
8.0.200.0030.00317.27
8.0.190.0000.00717.29
8.0.180.0030.00917.22
8.0.170.0000.00817.26
8.0.160.0040.00417.23
8.0.150.0000.00917.14
8.0.140.0000.00817.22
8.0.130.0060.00013.65
8.0.120.0040.00417.31
8.0.110.0040.00417.17
8.0.100.0050.00317.20
8.0.90.0080.00017.17
8.0.80.0110.01117.27
8.0.70.0040.00417.30
8.0.60.0050.00317.07
8.0.50.0030.00517.18
8.0.30.0180.00317.36
8.0.20.0150.00717.42
8.0.10.0050.00317.33
8.0.00.0100.01017.02
7.4.330.0030.00314.97
7.4.320.0040.00416.91
7.4.300.0030.00316.85
7.4.290.0040.00416.99
7.4.280.0040.00416.86
7.4.270.0000.00716.80
7.4.260.0040.00413.67
7.4.250.0030.00616.89
7.4.240.0040.00416.86
7.4.230.0040.00416.81
7.4.220.0130.00317.07
7.4.210.0080.00816.99
7.4.200.0040.00416.79
7.4.190.0040.00416.84
7.4.160.0070.01016.83
7.4.150.0210.01017.40
7.4.140.0120.00817.86
7.4.130.0090.01016.98
7.4.120.0050.01316.93
7.4.110.0060.01216.73
7.4.100.0000.02216.65
7.4.90.0040.01516.92
7.4.80.0030.01419.37
7.4.70.0040.01416.80
7.4.60.0120.00916.91
7.4.50.0060.00316.91
7.4.40.0100.00722.27
7.4.30.0180.00016.93
7.3.330.0000.00613.54
7.3.320.0060.00013.34
7.3.310.0000.00816.75
7.3.300.0040.00416.51
7.3.290.0110.00416.68
7.3.280.0040.01216.63
7.3.270.0100.01417.40
7.3.260.0100.00818.24
7.3.250.0090.00916.88
7.3.240.0030.01316.61
7.3.230.0150.00316.68
7.3.210.0100.00716.68
7.3.200.0070.01519.39
7.3.190.0090.00916.99
7.3.180.0100.01416.71
7.3.170.0060.01216.99
7.3.160.0100.00716.75
7.2.330.0070.01016.91
7.2.320.0040.01516.90
7.2.310.0030.01616.83
7.2.300.0030.01416.97
7.2.290.0100.00716.88
7.2.110.0180.01316.69
7.2.100.0330.00016.69
7.2.90.0230.00616.98
7.2.80.0210.00816.67
7.2.70.0190.01317.09
7.2.60.0160.01617.19
7.2.50.0230.00717.12
7.2.40.0240.00817.23
7.2.30.0200.00817.09
7.2.20.0110.01717.15
7.2.10.0120.01217.10
7.2.00.0090.01318.49
7.1.230.0390.00416.02
7.1.220.0310.00715.87
7.1.210.0280.00815.81
7.1.200.0160.01215.70
7.1.190.0140.01416.07
7.1.180.0110.01816.12
7.1.170.0120.01616.10
7.1.160.0200.00815.87
7.1.150.0120.01216.05
7.1.140.0120.01216.14
7.1.130.0170.01116.14
7.1.120.0170.00516.12
7.1.110.0130.00816.15
7.1.100.0140.00517.20
7.1.90.0220.00816.08
7.1.80.0090.01715.85
7.1.70.0090.00816.64
7.1.60.0170.01117.84
7.1.50.0150.01216.68
7.1.40.0240.01116.13
7.1.30.0230.01215.90
7.1.20.0210.01316.30
7.1.10.0220.00315.88
7.1.00.0070.03219.23
7.0.310.0270.00515.49
7.0.300.0220.00615.58
7.0.290.0170.01115.34
7.0.280.0190.01215.68
7.0.270.0130.01315.38
7.0.260.0140.01415.31
7.0.250.0240.00715.68
7.0.240.0220.00715.48
7.0.230.0160.01215.32
7.0.220.0220.00715.78
7.0.210.0160.01315.57
7.0.200.0100.00916.26
7.0.190.0240.00915.78
7.0.180.0160.01615.70
7.0.170.0220.00915.67
7.0.160.0180.00715.46
7.0.150.0220.01115.50
7.0.140.0120.04418.88
7.0.130.0150.01515.36
7.0.120.0220.00915.62
7.0.110.0180.01315.39
7.0.100.0210.01015.60
7.0.90.0200.00415.70
7.0.80.0200.01115.21
7.0.70.0110.05018.69
7.0.60.0130.04318.68
7.0.50.0100.04518.96
7.0.40.0140.05016.92
7.0.30.0150.04316.90
7.0.20.0150.04216.78
7.0.10.0110.03916.90
7.0.00.0080.04516.69
5.6.380.0410.01114.30
5.6.370.0200.01314.75
5.6.360.0180.00914.51
5.6.350.0150.01514.74
5.6.340.0190.01114.10
5.6.330.0230.00714.50
5.6.320.0230.00914.64
5.6.310.0160.00814.13
5.6.300.0170.01714.41
5.6.290.0140.01414.79
5.6.280.0190.04017.84
5.6.270.0190.01014.52
5.6.260.0130.01814.48
5.6.250.0130.01814.71
5.6.240.0160.01314.81
5.6.230.0190.00614.66
5.6.220.0150.04317.64
5.6.210.0160.03817.48
5.6.200.0140.04917.86
5.6.190.0120.03217.80
5.6.180.0130.03417.74
5.6.170.0130.04517.71
5.6.160.0180.04317.90
5.6.150.0240.04417.79
5.6.140.0220.04417.74
5.6.130.0220.05117.81
5.6.120.0170.02617.84
5.6.110.0150.02917.70
5.6.100.0110.02817.69
5.6.90.0190.02717.57
5.6.80.0120.02717.34
5.6.70.0230.02117.46
5.6.60.0250.02117.40
5.6.50.0100.02817.45
5.6.40.0120.02317.38
5.6.30.0120.02317.43
5.6.20.0160.01517.50
5.6.10.0130.02017.40
5.6.00.0100.03017.47
5.5.380.0130.01011.46
5.5.370.0160.00611.38
5.5.360.0070.05015.91
5.5.350.0090.03715.95
5.5.340.0020.05416.15
5.5.330.0090.04616.20
5.5.320.0110.03916.00
5.5.310.0100.03616.13
5.5.300.0200.03616.13
5.5.290.0110.04516.20
5.5.280.0130.02416.10
5.5.270.0130.02415.99
5.5.260.0150.02316.19
5.5.250.0090.02015.91
5.5.240.0170.02515.66
5.5.230.0150.02315.78
5.5.220.0170.02015.81
5.5.210.0130.01915.60
5.5.200.0060.02315.61
5.5.190.0090.01715.70
5.5.180.0070.02215.69
5.5.170.0160.01114.10
5.5.160.0090.02415.64
5.5.150.0080.02015.77
5.5.140.0070.02215.86
5.5.130.0090.02015.66
5.5.120.0120.02115.72
5.5.110.0080.02115.65
5.5.100.0080.02115.70
5.5.90.0100.01915.70
5.5.80.0070.02215.66
5.5.70.0050.02315.72
5.5.60.0100.02015.65
5.5.50.0110.01915.50
5.5.40.0080.02115.71
5.5.30.0090.01715.70
5.5.20.0110.01715.72
5.5.10.0110.01915.66
5.5.00.0050.02315.57
5.4.450.0120.04615.41
5.4.440.0120.02315.21
5.4.430.0160.01915.22
5.4.420.0110.02115.49
5.4.410.0170.02215.03
5.4.400.0100.02215.25
5.4.390.0080.02514.87
5.4.380.0130.01815.14
5.4.370.0110.02215.13
5.4.360.0090.01915.13
5.4.350.0110.02015.26
5.4.340.0050.02215.06
5.4.330.0160.00910.89
5.4.320.0100.02515.12
5.4.310.0100.01915.13
5.4.300.0080.01815.07
5.4.290.0080.01915.18
5.4.280.0090.01815.25
5.4.270.0120.02215.07
5.4.260.0060.02315.20
5.4.250.0150.01615.05
5.4.240.0080.01815.04
5.4.230.0050.02115.18
5.4.220.0080.02015.32
5.4.210.0050.02315.03
5.4.200.0070.02015.05
5.4.190.0030.02414.93
5.4.180.0050.02115.05
5.4.170.0090.01814.96
5.4.160.0100.02015.01
5.4.150.0130.02315.16
5.4.140.0080.02413.85
5.4.130.0070.02213.83
5.4.120.0070.02413.90
5.4.110.0090.02513.92
5.4.100.0060.04013.85
5.4.90.0130.03013.82
5.4.80.0110.03713.94
5.4.70.0080.03113.79
5.4.60.0070.03613.92
5.4.50.0140.03313.92
5.4.40.0110.03613.74
5.4.30.0080.04313.84
5.4.20.0110.03713.94
5.4.10.0050.04213.88
5.4.00.0120.03913.63
5.3.290.0070.01912.87
5.3.280.0060.02112.65
5.3.270.0070.02212.85
5.3.260.0080.02012.78
5.3.250.0020.02512.69
5.3.240.0060.02112.62
5.3.230.0070.03012.77
5.3.220.0070.02512.64
5.3.210.0100.02512.56
5.3.200.0070.04512.68
5.3.190.0070.04012.66
5.3.180.0090.03512.77
5.3.170.0070.03912.68
5.3.160.0100.04012.79
5.3.150.0050.04312.73
5.3.140.0070.04312.76
5.3.130.0130.04112.70
5.3.120.0070.03912.72
5.3.110.0070.04512.74
5.3.100.0130.03412.39
5.3.90.0070.03512.40
5.3.80.0080.04112.28
5.3.70.0080.04212.24
5.3.60.0090.03312.18
5.3.50.0120.04212.27
5.3.40.0060.03312.26
5.3.30.0080.03612.28
5.3.20.0080.02912.20
5.3.10.0080.03712.04
5.3.00.0070.04112.05
5.2.170.0070.03310.98
5.2.160.0130.01910.98
5.2.150.0080.02210.98
5.2.140.0070.03610.98
5.2.130.0090.02510.98
5.2.120.0110.02310.98
5.2.110.0050.03810.98
5.2.100.0070.03010.98
5.2.90.0100.03510.98
5.2.80.0080.03210.98
5.2.70.0110.02810.98
5.2.60.0110.03410.98
5.2.50.0090.03310.98
5.2.40.0080.03210.98
5.2.30.0060.03710.98
5.2.20.0080.03510.98
5.2.10.0070.03610.98
5.2.00.0070.03210.98
5.1.60.0060.02310.98
5.1.50.0110.02910.98
5.1.40.0060.03110.98
5.1.30.0030.03410.98
5.1.20.0040.03310.98
5.1.10.0110.02210.98
5.1.00.0070.02010.98
5.0.50.0070.02710.98
5.0.40.0050.02410.98
5.0.30.0020.04010.98
5.0.20.0100.01610.98
5.0.10.0080.01510.98
5.0.00.0070.02410.98
4.4.90.0070.01710.98
4.4.80.0050.02110.98
4.4.70.0030.02010.98
4.4.60.0070.02210.98
4.4.50.0030.02310.98
4.4.40.0080.02710.98
4.4.30.0070.02210.98
4.4.20.0070.02110.98
4.4.10.0070.02010.98
4.4.00.0070.03210.98
4.3.110.0060.01910.98
4.3.100.0060.02010.98
4.3.90.0020.02310.98
4.3.80.0070.03010.98
4.3.70.0050.02410.98
4.3.60.0020.02310.98
4.3.50.0090.02210.98
4.3.40.0020.03510.98
4.3.30.0000.02810.98
4.3.20.0050.02310.98
4.3.10.0010.02510.98
4.3.00.0060.01910.98

preferences:
78.45 ms | 401 KiB | 5 Q