3v4l.org

run code in 300+ PHP versions simultaneously
<?php $re = '/^(?:([0-9]+) X,)? ?(?:([0-9]+) Y,)?(?: Z)?$/m'; $str = <<<_ 66 X, 55 Y, Z 66 X, 55 Y, 66 X, Z 55 Y, Z 66 X, 55 Y, \n _; preg_match_all($re, $str, $matches, PREG_SET_ORDER); foreach ($matches as $match) { unset($match[0]); foreach (['null', 'null'] as $key => $value) { if (!isset($match[$key + 1]) || $match[$key + 1] === '') $match[$key + 1] = $value; } echo implode(" - ", $match), PHP_EOL; }

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.5.10.0130.00916.70
8.5.00.0120.01020.43
8.4.160.0130.00923.96
8.4.150.0020.00014.05
8.4.140.0120.01117.92
8.4.130.0150.00617.81
8.4.120.0120.00820.54
8.4.110.0080.01118.79
8.4.100.0060.00317.98
8.4.90.0070.00518.50
8.4.80.0130.00619.92
8.4.70.0100.01018.13
8.4.60.0140.00618.71
8.4.50.0080.00320.37
8.4.40.0090.00019.69
8.4.30.0070.01419.93
8.4.20.0060.01317.93
8.4.10.0070.01417.95
8.3.290.0150.00620.93
8.3.280.0150.00520.44
8.3.270.0140.00516.58
8.3.260.0080.00616.86
8.3.250.0140.00618.93
8.3.240.0130.00716.75
8.3.230.0120.00717.08
8.3.220.0140.00517.39
8.3.210.0090.01216.78
8.3.200.0040.00516.80
8.3.190.0060.00917.26
8.3.180.0080.00817.48
8.3.170.0110.00717.09
8.3.160.0070.01118.53
8.3.150.0070.00718.75
8.3.140.0120.00317.20
8.3.130.0030.00618.76
8.3.120.0030.00620.67
8.3.110.0000.00916.75
8.3.100.0080.00024.06
8.3.90.0080.00026.77
8.3.80.0060.00318.43
8.3.70.0090.00616.75
8.3.60.0110.00718.68
8.3.50.0060.01017.70
8.3.40.0110.00419.06
8.3.30.0160.00618.85
8.3.20.0080.00021.89
8.3.10.0040.00421.73
8.3.00.0050.00323.58
8.2.300.0070.00318.87
8.2.290.0130.00520.68
8.2.280.0080.01018.65
8.2.270.0130.00617.36
8.2.260.0030.01318.55
8.2.250.0060.00916.76
8.2.240.0040.00417.08
8.2.230.0000.00920.94
8.2.220.0090.00037.54
8.2.210.0070.00026.77
8.2.200.0040.00417.00
8.2.190.0070.00716.75
8.2.180.0130.00716.63
8.2.170.0060.00922.96
8.2.160.0110.00420.45
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0050.00326.16
8.2.120.0030.00519.61
8.2.110.0030.00621.20
8.2.100.0090.00318.03
8.2.90.0000.00918.28
8.2.80.0090.00019.79
8.2.70.0050.00318.04
8.2.60.0030.00617.93
8.2.50.0000.00718.28
8.2.40.0080.00019.30
8.2.30.0080.00021.14
8.2.20.0050.00218.16
8.2.10.0000.00718.27
8.2.00.0040.00419.35
8.1.340.0110.01021.73
8.1.330.0070.01223.84
8.1.320.0110.00816.36
8.1.310.0110.00718.53
8.1.300.0030.00618.28
8.1.290.0060.00330.84
8.1.280.0100.01025.92
8.1.270.0040.00422.19
8.1.260.0090.00026.35
8.1.250.0030.00628.09
8.1.240.0060.00322.13
8.1.230.0040.00720.92
8.1.220.0000.00817.74
8.1.210.0030.00518.83
8.1.200.0060.00317.48
8.1.190.0000.00817.22
8.1.180.0000.00818.10
8.1.170.0050.00318.62
8.1.160.0040.00418.85
8.1.150.0030.00519.04
8.1.140.0070.00017.74
8.1.130.0030.00620.79
8.1.120.0040.00417.67
8.1.110.0040.00417.53
8.1.100.0000.00817.65
8.1.90.0040.00417.53
8.1.80.0040.00417.53
8.1.70.0000.00717.64
8.1.60.0000.00917.73
8.1.50.0090.00017.65
8.1.40.0030.00617.73
8.1.30.0060.00317.80
8.1.20.0030.00517.74
8.1.10.0040.00417.73
8.1.00.0030.00617.59
8.0.300.0000.00820.00
8.0.290.0000.00816.88
8.0.280.0000.00718.33
8.0.270.0030.00317.17
8.0.260.0080.00017.20
8.0.250.0000.00717.14
8.0.240.0030.00617.20
8.0.230.0030.00317.30
8.0.220.0040.00417.22
8.0.210.0000.00717.07
8.0.200.0000.00717.20
8.0.190.0050.00317.13
8.0.180.0000.00817.23
8.0.170.0030.00617.09
8.0.160.0000.00717.10
8.0.150.0000.00717.09
8.0.140.0070.00017.20
8.0.130.0000.00613.62
8.0.120.0050.00517.06
8.0.110.0040.00417.09
8.0.100.0000.00717.07
8.0.90.0040.00417.12
8.0.80.0090.00617.18
8.0.70.0050.00317.20
8.0.60.0080.00017.17
8.0.50.0000.00717.01
8.0.30.0090.01017.23
8.0.20.0110.00917.50
8.0.10.0050.00217.31
8.0.00.0110.00717.20
7.4.330.0050.00015.55
7.4.320.0030.00316.78
7.4.300.0000.00616.82
7.4.290.0000.00816.70
7.4.280.0050.00316.73
7.4.270.0030.00516.84
7.4.260.0030.00716.80
7.4.250.0000.00716.62
7.4.240.0050.00216.76
7.4.230.0030.00316.91
7.4.220.0070.00016.77
7.4.210.0190.00516.81
7.4.200.0050.00216.72
7.4.160.0100.00916.77
7.4.140.0120.00917.86
7.4.130.0060.01216.85
7.4.120.0110.00816.78
7.4.110.0100.00716.65
7.4.100.0110.00616.82
7.4.90.0150.00416.78
7.4.80.0150.00919.39
7.4.70.0060.01616.71
7.4.60.0080.00816.76
7.4.50.0040.01416.71
7.4.40.0100.00716.72
7.4.10.0070.01315.39
7.4.00.0100.00715.10
7.3.330.0050.00013.52
7.3.320.0030.00313.54
7.3.310.0070.00016.62
7.3.300.0030.00316.53
7.3.290.0030.00316.73
7.3.280.0110.00716.65
7.3.260.0110.00816.76
7.3.240.0130.00616.58
7.3.230.0120.00916.82
7.3.210.0120.00616.63
7.3.200.0030.01316.52
7.3.190.0060.01516.82
7.3.180.0100.00716.73
7.3.170.0070.01016.55
7.3.160.0110.00716.69
7.3.130.0060.00615.15
7.3.120.0100.00714.98
7.3.110.0070.01115.00
7.3.100.0060.00615.00
7.3.90.0000.01315.10
7.3.80.0110.00015.03
7.3.70.0030.01115.17
7.3.60.0100.00315.12
7.3.50.0070.01014.91
7.3.40.0030.00714.93
7.3.30.0070.00414.75
7.3.20.0050.00516.80
7.3.10.0030.00916.82
7.3.00.0110.00517.04
7.2.330.0120.00617.00
7.2.320.0510.02216.90
7.2.310.0090.01016.86
7.2.300.0130.00616.80
7.2.290.0030.01616.80
7.2.260.0110.00715.38
7.2.250.0120.00615.11
7.2.240.0060.00915.36
7.2.230.0070.01015.12
7.2.220.0030.01315.51
7.2.210.0000.01015.39
7.2.200.0070.01015.01
7.2.190.0090.00315.07
7.2.180.0030.01315.00
7.2.170.0070.00715.28
7.2.160.0030.00615.32
7.2.150.0060.00917.21
7.2.140.0030.01217.05
7.2.130.0030.01217.10
7.2.120.0050.00917.21
7.2.110.0080.00816.97
7.2.100.0030.01216.90
7.2.90.0020.01317.08
7.2.80.0000.01317.12
7.2.70.0090.00517.06
7.2.60.0070.00817.18
7.2.50.0030.00917.20
7.2.40.1710.01117.39
7.2.30.1550.00717.38
7.2.20.1450.01117.53
7.2.10.1400.00717.40
7.2.00.0920.00917.48
7.1.330.0070.00715.81
7.1.320.0000.01115.91
7.1.310.0070.00716.13
7.1.300.0060.00616.11
7.1.290.0090.00615.98
7.1.280.0030.00916.08
7.1.270.0070.00715.86
7.1.260.0030.00615.74
7.1.250.0060.00715.94
7.1.240.0050.00816.03
7.1.230.0080.00515.92
7.1.220.0030.00816.00
7.1.210.0060.00615.98
7.1.200.0110.00616.05
7.1.190.0080.00515.91
7.1.180.0040.00616.01
7.1.170.0040.00415.84
7.1.160.1380.01316.31
7.1.150.1400.00616.34
7.1.140.0780.00616.23
7.1.130.0750.00616.38
7.1.120.1100.01016.31
7.1.110.0940.00816.20
7.1.100.1420.00716.12
7.1.90.0160.00516.24
7.1.80.0080.00816.21
7.1.70.0060.01115.92
7.1.60.0160.00621.83
7.1.50.0140.01021.66
7.1.40.0150.00921.65
7.1.30.0140.01221.77
7.1.20.0160.00921.71
7.1.10.0070.01015.81
7.1.00.0090.00715.67
7.0.330.0040.00815.56
7.0.320.0000.00815.62
7.0.310.0100.00315.38
7.0.300.0060.00615.52
7.0.290.0040.00415.70
7.0.280.0070.00715.62
7.0.270.0120.00015.40
7.0.260.0060.01015.68
7.0.250.0080.00615.69
7.0.240.0090.00015.78
7.0.230.0000.01515.85
7.0.220.0030.01015.82
7.0.210.0060.00915.61
7.0.200.0060.00315.62
7.0.190.0000.01715.70
7.0.180.0030.00915.58
7.0.170.0030.00615.57
7.0.160.0070.00715.66
7.0.150.0000.01715.52
7.0.140.0090.00615.70
7.0.130.0070.00315.83
7.0.120.0100.00315.62
7.0.110.0050.00815.53
7.0.100.0080.00415.69
7.0.90.0030.01215.47
7.0.80.0100.00315.75
7.0.70.0030.00715.34
7.0.60.0040.00815.81
7.0.50.0090.00315.73
7.0.40.0050.00513.53
7.0.30.0060.00613.55
7.0.20.0070.00413.54
7.0.10.0000.00813.42
7.0.00.0080.00313.60
5.6.400.0000.01114.64
5.6.390.0070.00314.50
5.6.380.0020.00614.71
5.6.370.0060.01014.49
5.6.360.0060.00914.27
5.6.350.0060.00614.61
5.6.340.0060.00914.63
5.6.330.0070.00714.92
5.6.320.0070.00714.38
5.6.310.0030.00914.69
5.6.300.0040.01114.87
5.6.290.0040.01214.65
5.6.280.0000.01314.34
5.6.270.0000.01214.60
5.6.260.0040.00414.81
5.6.250.0110.00414.57
5.6.240.0100.00614.30
5.6.230.0000.01414.87
5.6.220.0070.00314.66
5.6.210.0000.01114.52
5.6.200.0040.01214.61
5.6.190.0120.00314.21
5.6.180.0060.00314.57
5.6.170.0060.00914.45
5.6.160.0080.00314.28
5.6.150.0050.00514.64
5.6.140.0130.00314.65
5.6.130.0030.00714.78
5.6.120.0070.00414.32
5.6.110.0030.01014.44
5.6.100.0030.01014.21
5.6.90.0030.00914.66
5.6.80.0030.01014.58
5.6.70.0040.01114.41
5.6.60.0070.00714.71
5.6.50.0090.00614.59
5.6.40.0070.00714.71
5.6.30.0030.00614.60
5.6.20.0100.00014.49
5.6.10.0080.00314.34
5.6.00.0060.00614.54

preferences:
41.72 ms | 403 KiB | 5 Q