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('static', 'static::replace'), $it); } private static function replace($matches) { return sprintf(self::$mask, $matches[0]); } } abstract class MyModule extends Module { private static $mask = '{{{%s}}}'; protected static function replace($matches) { return sprintf(self::$mask, $matches[0]); } }

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.0040.01116.88
8.3.60.0140.00717.00
8.3.50.0220.01016.61
8.3.40.0160.00318.99
8.3.30.0150.00019.02
8.3.20.0080.00019.02
8.3.10.0080.00020.78
8.3.00.0050.00319.75
8.2.180.0060.01516.63
8.2.170.0150.00322.96
8.2.160.0100.00721.00
8.2.150.0030.00524.18
8.2.140.0040.00424.66
8.2.130.0000.00826.16
8.2.120.0040.00420.87
8.2.110.0060.00321.11
8.2.100.0120.00018.03
8.2.90.0040.00419.47
8.2.80.0040.00419.34
8.2.70.0100.00017.75
8.2.60.0000.00818.03
8.2.50.0030.00618.07
8.2.40.0000.00817.89
8.2.30.0040.00418.11
8.2.20.0000.00817.83
8.2.10.0030.00517.75
8.2.00.0070.00417.78
8.1.280.0090.00625.92
8.1.270.0050.00224.66
8.1.260.0030.00526.35
8.1.250.0040.00428.09
8.1.240.0090.00022.60
8.1.230.0040.00820.95
8.1.220.0040.00417.77
8.1.210.0080.00018.83
8.1.200.0040.00417.25
8.1.190.0000.00817.39
8.1.180.0080.00018.10
8.1.170.0040.00418.77
8.1.160.0000.00718.79
8.1.150.0040.00418.58
8.1.140.0050.00317.39
8.1.130.0030.00317.82
8.1.120.0000.00817.48
8.1.110.0000.00817.45
8.1.100.0040.00417.53
8.1.90.0070.00017.52
8.1.80.0000.00717.37
8.1.70.0000.00717.45
8.1.60.0050.00317.66
8.1.50.0030.00617.44
8.1.40.0040.00417.63
8.1.30.0070.00017.73
8.1.20.0050.00317.78
8.1.10.0030.00617.64
8.1.00.0040.00417.69
8.0.300.0030.00519.93
8.0.290.0000.00716.88
8.0.280.0040.00418.45
8.0.270.0000.00717.23
8.0.260.0030.00318.45
8.0.250.0000.00717.11
8.0.240.0050.00516.94
8.0.230.0070.00016.91
8.0.220.0070.00016.93
8.0.210.0070.00016.96
8.0.200.0000.00717.04
8.0.190.0000.00716.90
8.0.180.0000.00716.91
8.0.170.0030.00516.89
8.0.160.0000.00717.02
8.0.150.0000.00816.79
8.0.140.0060.00316.89
8.0.130.0000.00613.34
8.0.120.0040.00416.95
8.0.110.0040.00416.73
8.0.100.0030.00316.75
8.0.90.0070.00016.71
8.0.80.0040.01116.80
8.0.70.0080.00016.94
8.0.60.0000.00716.79
8.0.50.0000.00716.98
8.0.30.0150.00416.97
8.0.20.0130.00617.32
8.0.10.0050.00216.87
8.0.00.0060.01117.05
7.4.330.0050.00012.98
7.4.320.0030.00316.58
7.4.300.0060.00016.68
7.4.290.0030.00316.66
7.4.280.0040.00416.65
7.4.270.0000.00716.78
7.4.260.0000.00513.29
7.4.250.0030.00516.73
7.4.240.0000.00716.75
7.4.230.0030.00316.58
7.4.220.0150.00316.61
7.4.210.0040.01116.71
7.4.200.0050.00216.83
7.4.190.0040.00416.73
7.4.160.0060.00916.67
7.4.150.0180.00916.66
7.4.140.0090.01016.47
7.4.130.0070.01316.87
7.4.120.0110.01016.71
7.4.110.0060.01216.72
7.4.100.0170.00016.68
7.4.90.0160.00816.51
7.4.80.0110.00716.76
7.4.70.0030.01916.73
7.4.60.0130.00316.58
7.4.50.0040.00816.30
7.4.40.0030.01116.55
7.4.30.0120.00416.54
7.4.00.0000.01314.81
7.3.330.0000.00713.38
7.3.320.0050.00013.38
7.3.310.0000.00716.52
7.3.300.0030.00316.57
7.3.290.0060.01016.47
7.3.280.0090.00916.43
7.3.270.0120.00616.72
7.3.260.0080.00916.48
7.3.250.0090.01216.60
7.3.240.0060.01016.73
7.3.230.0060.00916.48
7.3.210.0040.01316.48
7.3.200.0130.00319.39
7.3.190.0160.00016.74
7.3.180.0130.00316.50
7.3.170.0170.00016.61
7.3.160.0090.00916.43
7.3.120.0090.00614.68
7.3.10.0070.00716.46
7.3.00.0090.00316.73
7.2.330.0170.00016.86
7.2.320.0040.01316.78
7.2.310.0090.00916.85
7.2.300.0090.01516.86
7.2.290.0130.00316.71
7.2.130.0000.01517.13
7.2.120.0060.00817.01
7.2.110.0060.00916.87
7.2.100.0110.00417.04
7.2.90.0000.00917.17
7.2.80.0070.00417.03
7.2.70.0070.00717.06
7.2.60.0030.01016.95
7.2.50.0000.01517.09
7.2.40.0070.00416.80
7.2.30.0030.01017.00
7.2.20.0120.00317.00
7.2.10.0040.01117.23
7.2.00.0070.00618.49
7.1.250.0100.00316.13
7.1.200.0080.00616.09
7.1.100.0030.00717.90
7.1.70.0180.00617.32
7.1.60.0050.00519.40
7.1.50.0040.01817.22
7.1.00.0070.06322.43
7.0.200.0040.00416.85
7.0.140.0130.06722.02
7.0.120.0000.07022.05
7.0.60.0070.08320.01
7.0.50.0070.08017.87
7.0.40.0070.08720.16
7.0.30.0330.04320.10
7.0.20.0300.05320.27
7.0.10.0300.06320.09
7.0.00.0070.05020.18
5.6.280.0070.06721.07
5.6.210.0100.08020.64
5.6.200.0130.06018.13
5.6.190.0030.08020.63
5.6.180.0300.07720.36
5.6.170.0200.06320.52
5.6.160.0000.04320.46
5.6.150.0070.08318.18
5.6.140.0100.05318.26
5.6.130.0000.06318.15
5.6.120.0100.08320.99
5.6.110.0070.07321.12
5.6.100.0030.08321.06
5.6.90.0070.08721.09
5.6.80.0130.07320.51
5.6.70.0230.06020.41
5.5.350.0200.03320.36
5.5.340.0070.03717.96
5.5.330.0000.05320.43
5.5.320.0200.08020.38
5.5.310.0230.08020.32
5.5.300.0130.07017.96
5.5.290.0100.05317.95
5.5.280.0070.08720.66
5.5.270.0100.08320.80
5.5.260.0100.07720.69
5.5.250.0070.07720.59
5.5.240.0070.05720.35
5.4.450.0130.06719.21
5.4.440.0130.07319.48
5.4.430.0100.07319.53
5.4.420.0030.08019.44
5.4.410.0130.07019.07
5.4.400.0130.07019.24
5.4.390.0130.05719.24
5.4.380.0100.04718.87
5.4.370.0030.05318.92
5.4.360.0170.06318.87
5.4.350.0000.04319.14
5.4.340.0030.04718.85
5.4.320.0030.07019.25
5.4.310.0000.08018.84
5.4.300.0030.04018.84
5.4.290.0000.06019.17
5.4.280.0030.04719.00
5.4.270.0030.06019.02
5.4.260.0030.07719.24
5.4.250.0100.04319.24
5.4.240.0030.07319.16
5.4.230.0070.05018.91
5.4.220.0100.06019.23
5.4.210.0130.07319.14
5.4.200.0000.07718.87
5.4.190.0070.05019.23
5.4.180.0100.07318.86
5.4.170.0030.05019.23
5.4.160.0030.08019.21
5.4.150.0100.03319.13
5.4.140.0030.05716.50
5.4.130.0130.05016.54
5.4.120.0100.04016.36
5.4.110.0070.03716.44
5.4.100.0100.07016.33
5.4.90.0100.03716.46
5.4.80.0030.05716.50
5.4.70.0170.05716.45
5.4.60.0030.04316.26
5.4.50.0030.03316.41
5.4.40.0000.06716.40
5.4.30.0100.04016.36
5.4.20.0030.03316.27
5.4.10.0030.04016.42
5.4.00.0000.04315.72
5.3.290.0030.05014.67
5.3.280.0100.05314.59
5.3.270.0230.05714.54
5.3.260.0130.06314.77
5.3.250.0000.06014.64
5.3.240.0070.05714.63
5.3.230.0030.07014.63
5.3.220.0030.06314.58
5.3.210.0030.04014.56
5.3.200.0000.04314.71
5.3.190.0200.03714.58
5.3.180.0000.04014.61
5.3.170.0070.04014.56
5.3.160.0100.07314.61
5.3.150.0070.05314.64
5.3.140.0030.03314.56
5.3.130.0100.03014.58
5.3.120.0000.04014.61
5.3.110.0000.04014.58
5.3.100.0100.03014.07
5.3.90.0030.04014.09
5.3.80.0000.04014.03
5.3.70.0070.03313.99
5.3.60.0000.03714.08
5.3.50.0030.03714.00
5.3.40.0000.03713.88
5.3.30.0070.03013.95
5.3.20.0030.03313.75
5.3.10.0070.04013.81
5.3.00.0030.03313.81
5.2.170.0030.02711.04
5.2.160.0070.03011.17
5.2.150.0070.02711.15
5.2.140.0000.03011.20
5.2.130.0070.02711.14
5.2.120.0070.02311.18
5.2.110.0000.03011.11
5.2.100.0070.02311.15
5.2.90.0030.02711.03
5.2.80.0000.03011.18
5.2.70.0000.03011.29
5.2.60.0070.02711.22
5.2.50.0030.02711.01
5.2.40.0000.03011.04
5.2.30.0030.02710.98
5.2.20.0000.03010.93
5.2.10.0030.02710.88
5.2.00.0000.03010.87
5.1.60.0130.0179.98
5.1.50.0070.02010.14
5.1.40.0000.02710.04
5.1.30.0100.02310.36
5.1.20.0000.03010.36
5.1.10.0030.0239.98
5.1.00.0000.03010.14
5.0.50.0000.0208.70
5.0.40.0030.0178.44
5.0.30.0000.0308.14
5.0.20.0030.0178.22
5.0.10.0000.0208.24
5.0.00.0000.0338.11
4.4.90.0000.0177.74
4.4.80.0000.0137.74
4.4.70.0030.0137.74
4.4.60.0000.0177.74
4.4.50.0000.0177.74
4.4.40.0000.0277.74
4.4.30.0000.0177.74
4.4.20.0000.0177.74
4.4.10.0000.0177.74
4.4.00.0000.0337.74
4.3.110.0000.0137.74
4.3.100.0000.0177.74
4.3.90.0000.0177.74
4.3.80.0000.0237.74
4.3.70.0000.0137.74
4.3.60.0030.0137.74
4.3.50.0030.0137.74
4.3.40.0030.0307.74
4.3.30.0030.0237.74
4.3.20.0030.0177.74
4.3.10.0000.0307.74
4.3.00.0130.0307.74

preferences:
58.97 ms | 401 KiB | 5 Q