3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo Module::work('hello world.'), "\n"; echo MyModule::work('hello world.'); abstract class Module { private static $mask = '[[[%s]]]'; public static function work($it) { return preg_replace_callback('~\w+~', array('Module', 'static::replace'), $it); } private static function replace($matches) { return sprintf(static::$mask, $matches[0]); } } abstract class MyModule extends Module { protected static $mask = '{{{%s}}}'; }

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.0120.00316.75
8.3.60.0150.00316.63
8.3.50.0100.01322.06
8.3.40.0030.01218.93
8.3.30.0100.00319.04
8.3.20.0080.00020.16
8.3.10.0040.00423.61
8.3.00.0050.00319.38
8.2.180.0040.01118.41
8.2.170.0110.00722.96
8.2.160.0120.00620.39
8.2.150.0080.00024.18
8.2.140.0000.00824.66
8.2.130.0100.00726.16
8.2.120.0060.00322.38
8.2.110.0070.00419.17
8.2.100.0040.00717.97
8.2.90.0030.00519.30
8.2.80.0000.00817.97
8.2.70.0060.00317.88
8.2.60.0000.00817.80
8.2.50.0040.00518.07
8.2.40.0090.00018.34
8.2.30.0040.00418.09
8.2.20.0060.00317.99
8.2.10.0040.00418.03
8.2.00.0000.00917.96
8.1.280.0100.01025.92
8.1.270.0120.00322.14
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0060.00322.18
8.1.230.0120.00020.91
8.1.220.0030.00517.74
8.1.210.0040.00418.77
8.1.200.0060.00317.35
8.1.190.0050.00317.27
8.1.180.0040.00418.10
8.1.170.0050.00618.66
8.1.160.0000.00921.94
8.1.150.0020.00518.79
8.1.140.0000.00717.41
8.1.130.0030.00317.86
8.1.120.0050.00217.45
8.1.110.0070.00017.54
8.1.100.0080.00017.53
8.1.90.0000.00717.55
8.1.80.0080.00017.43
8.1.70.0030.00517.43
8.1.60.0030.00617.72
8.1.50.0030.00517.53
8.1.40.0040.00417.64
8.1.30.0040.00417.56
8.1.20.0040.00417.73
8.1.10.0050.00217.61
8.1.00.0060.00317.57
8.0.300.0020.00518.77
8.0.290.0000.00716.88
8.0.280.0040.00418.36
8.0.270.0040.00417.02
8.0.260.0000.00716.91
8.0.250.0000.00717.09
8.0.240.0040.00417.19
8.0.230.0030.00316.98
8.0.220.0030.00317.01
8.0.210.0000.00717.10
8.0.200.0070.00017.07
8.0.190.0000.00917.13
8.0.180.0040.00416.98
8.0.170.0040.00417.12
8.0.160.0050.00217.13
8.0.150.0070.00017.02
8.0.140.0070.00017.05
8.0.130.0030.00313.55
8.0.120.0040.00416.89
8.0.110.0070.00016.96
8.0.100.0050.00216.83
8.0.90.0070.00016.93
8.0.80.0090.00617.05
8.0.70.0070.00016.91
8.0.60.0030.00517.00
8.0.50.0040.00417.18
8.0.30.0090.01017.34
8.0.20.0170.00817.43
8.0.10.0040.00417.09
8.0.00.0080.01016.86
7.4.330.0030.00315.00
7.4.320.0030.00316.60
7.4.300.0040.00416.55
7.4.290.0060.00316.59
7.4.280.0070.00016.69
7.4.270.0080.00016.77
7.4.260.0040.00416.73
7.4.250.0030.00516.57
7.4.240.0010.00616.76
7.4.230.0030.00316.50
7.4.220.0130.00316.79
7.4.210.0080.00916.77
7.4.200.0000.00716.79
7.4.190.0040.00416.76
7.4.160.0030.01316.58
7.4.150.0140.00417.40
7.4.140.0130.00417.86
7.4.130.0100.01016.73
7.4.120.0090.00916.67
7.4.110.0080.00916.60
7.4.100.0080.01116.75
7.4.90.0070.01416.80
7.4.80.0150.00419.39
7.4.70.0110.00616.52
7.4.60.0180.00316.83
7.4.50.0000.00616.48
7.4.40.0030.01422.77
7.4.30.0100.00716.86
7.4.00.0070.00715.38
7.3.330.0030.00313.44
7.3.320.0050.00013.52
7.3.310.0000.00716.62
7.3.300.0030.00316.43
7.3.290.0090.00916.53
7.3.280.0080.00916.51
7.3.270.0070.01117.40
7.3.260.0100.00816.53
7.3.250.0140.01116.60
7.3.240.0090.00916.59
7.3.230.0090.00916.69
7.3.210.0040.01416.64
7.3.200.0060.01319.39
7.3.190.0050.01516.69
7.3.180.0050.01116.46
7.3.170.0090.00616.86
7.3.160.0070.01116.50
7.3.120.0090.00615.05
7.2.330.0120.01016.67
7.2.320.0060.01616.78
7.2.310.0120.00916.60
7.2.300.0070.01316.68
7.2.290.0130.01216.91
7.2.60.0170.00616.67
7.2.00.0040.00819.85
7.1.200.0140.00315.85
7.1.100.0060.00918.33
7.1.70.0000.00817.57
7.1.60.0100.01319.33
7.1.50.0170.02035.09
7.1.00.0070.07022.46
7.0.200.0000.00816.60
7.0.140.0070.07022.11
7.0.60.0070.08020.03
7.0.50.0030.08017.89
7.0.40.0070.05020.17
7.0.30.0600.06320.10
7.0.20.0200.08320.12
7.0.10.0030.08720.27
7.0.00.0100.08320.17
5.6.280.0070.07021.11
5.6.210.0030.08720.63
5.6.200.0100.04318.21
5.6.190.0000.06720.39
5.6.180.0200.05020.61
5.6.170.0170.04020.45
5.6.160.0000.05020.57
5.6.150.0100.07018.29
5.6.140.0130.06318.24
5.6.130.0070.08318.23
5.6.120.0130.03720.97
5.6.110.0070.05021.14
5.6.100.0100.08321.00
5.6.90.0100.07721.08
5.6.80.0130.07020.38
5.6.70.3270.02720.36
5.5.350.0000.04020.47
5.5.340.0000.04017.92
5.5.330.0030.06720.13
5.5.320.0370.05020.30
5.5.310.0430.03720.26
5.5.300.0030.07017.92
5.5.290.0130.07317.98
5.5.280.0200.03720.79
5.5.270.0130.07720.87
5.5.260.0070.07720.77
5.5.250.0130.08020.77
5.5.240.0000.04020.20
5.4.450.0230.07019.48
5.4.440.0230.05019.55
5.4.430.0270.05719.40
5.4.420.0200.08319.54
5.4.410.0230.07019.23
5.4.400.0270.05319.00
5.4.390.0300.04319.00
5.4.380.0270.03719.22
5.4.370.0270.04319.09
5.4.360.0230.08019.25
5.4.350.0430.05719.15
5.4.340.0300.06318.85
5.4.320.0430.06019.25
5.4.310.0330.07019.30
5.4.300.0300.04719.21
5.4.290.0400.05718.87
5.4.280.0270.04719.13
5.4.270.0300.07719.06
5.4.260.0300.03319.06
5.4.250.0230.05019.12
5.4.240.0270.04019.20
5.4.230.0330.05719.08
5.4.220.0330.05719.25
5.4.210.0330.05719.31
5.4.200.0330.06019.15
5.4.190.0330.06718.98
5.4.180.0300.07719.12
5.4.170.0270.04718.98
5.4.160.0230.06318.96
5.4.150.0270.05019.20
5.4.140.0270.04316.44
5.4.130.0330.04716.55
5.4.120.0270.05716.56
5.4.110.0330.06016.51
5.4.100.0270.04716.40
5.4.90.0270.03716.50
5.4.80.0430.05716.40
5.4.70.0330.06016.62
5.4.60.0230.04016.43
5.4.50.0300.06716.53
5.4.40.0330.06016.38
5.4.30.0300.06716.51
5.4.20.0200.04016.51
5.4.10.0300.06716.38
5.4.00.0370.05315.82
5.3.290.0500.04314.57
5.3.280.0370.05314.59
5.3.270.0200.05714.61
5.3.260.0270.04314.83
5.3.250.0270.05714.70
5.3.240.0300.04314.58
5.3.230.0300.06014.52
5.3.220.0270.07714.58
5.3.210.0270.04714.69
5.3.200.0300.03314.56
5.3.190.0330.05714.56
5.3.180.0230.05014.49
5.3.170.0270.04714.49
5.3.160.0270.04714.55
5.3.150.0270.04714.47
5.3.140.0300.07014.64
5.3.130.0270.07014.46
5.3.120.0230.04014.61
5.3.110.0270.05014.46
5.3.100.0270.04714.01
5.3.90.0330.03714.03
5.3.80.0400.06014.25
5.3.70.0230.07314.14
5.3.60.0330.06014.01
5.3.50.0300.04313.88
5.3.40.0200.05713.93
5.3.30.0330.06013.84
5.3.20.0400.06013.78
5.3.10.0370.06013.82
5.3.00.0270.05013.80
5.2.170.0200.03712.05
5.2.160.0270.05312.05
5.2.150.0270.03312.05
5.2.140.0330.05312.05
5.2.130.0330.05312.05
5.2.120.0330.06012.05
5.2.110.0330.05312.05
5.2.100.0200.03012.05
5.2.90.0170.03312.05
5.2.80.0200.03312.05
5.2.70.0200.03312.05
5.2.60.0230.05312.05
5.2.50.0270.02312.05
5.2.40.0200.03312.05
5.2.30.0170.04012.05
5.2.20.0200.02712.05
5.2.10.0170.05012.05
5.2.00.0230.04312.05
5.1.60.0170.03012.05
5.1.50.0270.04712.05
5.1.40.0230.04012.05
5.1.30.0200.04012.05
5.1.20.0200.03012.05
5.1.10.0270.04012.05
5.1.00.0230.04712.05
5.0.50.0130.03712.05
5.0.40.0170.03712.05
5.0.30.0070.03312.05
5.0.20.0130.02712.05
5.0.10.0170.03712.05
5.0.00.0130.04012.05
4.4.90.0070.02012.05
4.4.80.0130.01312.05
4.4.70.0100.02312.05
4.4.60.0070.02712.05
4.4.50.0130.02712.05
4.4.40.0130.03712.05
4.4.30.0130.03312.05
4.4.20.0100.03712.05
4.4.10.0130.03312.05
4.4.00.0130.04012.05
4.3.110.0100.02312.05
4.3.100.0130.03012.05
4.3.90.0130.03312.05
4.3.80.0130.04012.05
4.3.70.0100.02312.05
4.3.60.0170.03012.05
4.3.50.0070.03012.05
4.3.40.0100.03012.05
4.3.30.0070.03312.05
4.3.20.0100.02712.05
4.3.10.0030.01712.05
4.3.00.0030.04012.05

preferences:
40.71 ms | 401 KiB | 5 Q