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('self', 'self::replace'), $it); } private static function replace($matches) { return sprintf(self::$mask, $matches[0]); } } abstract class MyModule extends Module { protected static $mask = '{{{%s}}}'; private 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.0120.00316.75
8.3.60.0120.00916.88
8.3.50.0040.01217.51
8.3.40.0120.00319.00
8.3.30.0090.00618.91
8.3.20.0040.00418.85
8.3.10.0030.00620.77
8.3.00.0000.00819.63
8.2.180.0170.00325.92
8.2.170.0060.00919.19
8.2.160.0100.00322.96
8.2.150.0050.00325.66
8.2.140.0070.00024.66
8.2.130.0020.00526.16
8.2.120.0050.00220.88
8.2.110.0090.00019.32
8.2.100.0090.00318.16
8.2.90.0040.00419.34
8.2.80.0090.00019.46
8.2.70.0080.00017.75
8.2.60.0040.00417.93
8.2.50.0030.00518.07
8.2.40.0040.00418.14
8.2.30.0020.00518.05
8.2.20.0020.00917.83
8.2.10.0000.00817.75
8.2.00.0080.00017.83
8.1.280.0090.00625.92
8.1.270.0070.00023.99
8.1.260.0000.00826.35
8.1.250.0050.00328.09
8.1.240.0050.00523.58
8.1.230.0120.00320.70
8.1.220.0000.00818.77
8.1.210.0080.00019.23
8.1.200.0040.00417.36
8.1.190.0000.00817.41
8.1.180.0000.00818.10
8.1.170.0080.00018.84
8.1.160.0040.00418.70
8.1.150.0040.00418.62
8.1.140.0040.00417.37
8.1.130.0070.00017.79
8.1.120.0000.00717.50
8.1.110.0000.00817.46
8.1.100.0050.00217.51
8.1.90.0040.00417.48
8.1.80.0050.00317.49
8.1.70.0030.00317.50
8.1.60.0040.00417.68
8.1.50.0060.00317.45
8.1.40.0040.00417.61
8.1.30.0030.00617.57
8.1.20.0040.00417.65
8.1.10.0040.00417.60
8.1.00.0050.00217.46
8.0.300.0000.00719.88
8.0.290.0000.00816.75
8.0.280.0030.00318.46
8.0.270.0040.00417.28
8.0.260.0030.00318.46
8.0.250.0000.00717.11
8.0.240.0030.00717.08
8.0.230.0000.00817.08
8.0.220.0080.00017.06
8.0.210.0070.00016.98
8.0.200.0070.00017.02
8.0.190.0000.00717.06
8.0.180.0040.00416.98
8.0.170.0000.00816.91
8.0.160.0000.00717.02
8.0.150.0050.00516.89
8.0.140.0000.00716.88
8.0.130.0030.00313.30
8.0.120.0060.00316.74
8.0.110.0000.00716.95
8.0.100.0070.00016.78
8.0.90.0050.00216.98
8.0.80.0140.00016.98
8.0.70.0000.00816.88
8.0.60.0040.00416.68
8.0.50.0000.00716.85
8.0.30.0060.01017.06
8.0.20.0090.01017.11
8.0.10.0000.00816.94
8.0.00.0150.00816.83
7.4.330.0060.00013.00
7.4.320.0070.00016.68
7.4.300.0060.00016.69
7.4.290.0030.00316.67
7.4.280.0040.00416.71
7.4.270.0000.00716.74
7.4.260.0000.00513.43
7.4.250.0060.00316.74
7.4.240.0000.00716.52
7.4.230.0000.00716.55
7.4.220.0140.01116.55
7.4.210.0100.00616.72
7.4.200.0040.00316.78
7.4.190.0000.00716.71
7.4.160.0120.00316.66
7.4.150.0120.00616.75
7.4.140.0070.01016.58
7.4.130.0070.01016.77
7.4.120.0060.01116.57
7.4.110.0170.00016.50
7.4.100.0030.01616.57
7.4.90.0030.01516.65
7.4.80.0140.00319.39
7.4.70.0030.02016.61
7.4.60.0120.00616.73
7.4.50.0060.00316.42
7.4.40.0060.01016.53
7.4.30.0000.01516.46
7.4.00.0130.00515.28
7.3.330.0000.00613.44
7.3.320.0040.00413.48
7.3.310.0000.00816.62
7.3.300.0070.00016.38
7.3.290.0100.01016.45
7.3.280.0080.00716.42
7.3.270.0150.00316.59
7.3.260.0180.00616.51
7.3.250.0120.00916.57
7.3.240.0090.00916.52
7.3.230.0090.00916.79
7.3.210.0070.01016.88
7.3.200.0090.00616.50
7.3.190.0060.01016.73
7.3.180.0070.01316.51
7.3.170.0000.01816.76
7.3.160.0130.01016.71
7.3.120.0050.01114.86
7.3.110.0110.00714.76
7.3.100.0100.00714.96
7.3.90.0030.00614.91
7.3.80.0100.00315.00
7.3.70.0000.01514.89
7.3.60.0030.01015.08
7.3.50.0040.01114.80
7.3.40.0030.01015.01
7.3.30.0030.01314.62
7.3.20.0110.00316.54
7.3.10.0070.01016.82
7.3.00.0030.00616.64
7.2.330.0060.01216.79
7.2.320.0110.00816.45
7.2.310.0090.01316.80
7.2.300.0150.00016.82
7.2.290.0060.01016.92
7.2.250.0030.01515.08
7.2.240.0090.00915.12
7.2.230.0060.00615.23
7.2.220.0050.00515.05
7.2.210.0040.00815.19
7.2.200.0030.01214.95
7.2.190.0030.00715.17
7.2.180.0070.00715.14
7.2.170.0060.00915.16
7.2.60.0070.00716.82
7.2.00.0000.01619.34
7.1.330.0060.00615.95
7.1.320.0030.00616.15
7.1.310.0000.01215.84
7.1.300.0030.00616.01
7.1.290.0040.00816.05
7.1.280.0070.00716.07
7.1.270.0110.00315.98
7.1.260.0070.00715.99
7.1.200.0100.00315.90
7.1.100.0100.00718.44
7.1.70.0000.00717.36
7.1.60.0070.01719.30
7.1.50.0100.00717.11
7.1.00.0030.07022.28
7.0.200.0050.00216.88
7.0.140.0030.07322.07
7.0.120.0100.06722.05
7.0.60.0100.05319.93
7.0.50.0070.05017.89
7.0.40.0070.08720.10
7.0.30.0570.07020.25
7.0.20.0330.08320.25
7.0.10.0070.04320.09
7.0.00.0100.08720.34
5.6.280.0070.07021.15
5.6.210.0130.06020.76
5.6.200.0130.07018.14
5.6.190.0000.06320.46
5.6.180.0170.05320.45
5.6.170.0330.04720.57
5.6.160.0030.08720.55
5.6.150.0130.05018.19
5.6.140.0070.08018.18
5.6.130.0130.07018.18
5.6.120.0100.05020.90
5.6.110.0170.08321.14
5.6.100.0070.08021.14
5.6.90.0100.05720.95
5.6.80.0000.05720.43
5.6.70.4630.02720.39
5.5.350.0130.05720.45
5.5.340.0130.07717.98
5.5.330.0030.07320.47
5.5.320.0170.08020.34
5.5.310.0200.04720.28
5.5.300.0000.04718.10
5.5.290.0200.06717.96
5.5.280.0100.08020.89
5.5.270.0000.08720.88
5.5.260.0100.07720.86
5.5.250.0030.08020.47
5.5.240.0170.05320.34
5.4.450.0030.08719.21
5.4.440.0130.05719.18
5.4.430.0070.04719.29
5.4.420.0030.06719.47
5.4.410.0000.06019.05
5.4.400.0170.06718.86
5.4.390.0030.04719.24
5.4.380.0170.05319.21
5.4.370.0070.08019.16
5.4.360.0070.05319.08
5.4.350.0030.07318.87
5.4.340.0000.06019.14
5.4.320.0070.06019.28
5.4.310.0070.04019.15
5.4.300.0030.04719.24
5.4.290.0100.03319.24
5.4.280.0000.05718.86
5.4.270.0070.03718.84
5.4.260.0030.04018.97
5.4.250.0100.05018.99
5.4.240.0030.07719.11
5.4.230.0070.03719.20
5.4.220.0000.08718.93
5.4.210.0070.08018.99
5.4.200.0100.07719.23
5.4.190.0170.05318.97
5.4.180.0100.07718.84
5.4.170.0070.05319.13
5.4.160.0030.07718.90
5.4.150.0030.04319.12
5.4.140.0130.06016.58
5.4.130.0000.08316.47
5.4.120.0030.06316.55
5.4.110.0070.03316.46
5.4.100.0030.05316.36
5.4.90.0000.06716.47
5.4.80.0030.07316.34
5.4.70.0130.06316.41
5.4.60.0000.07316.27
5.4.50.0070.07016.38
5.4.40.0070.04016.31
5.4.30.0130.07016.39
5.4.20.0070.05716.31
5.4.10.0100.03316.39
5.4.00.0130.06715.74
5.3.290.0030.05014.67
5.3.280.0070.06314.63
5.3.270.0070.08014.76
5.3.260.0100.06714.53
5.3.250.0170.07014.76
5.3.240.0030.05014.62
5.3.230.0100.07714.63
5.3.220.0100.07014.64
5.3.210.0030.04314.61
5.3.200.0130.05714.57
5.3.190.0070.06714.72
5.3.180.0070.07714.57
5.3.170.0070.07314.74
5.3.160.0030.08314.71
5.3.150.0030.06714.57
5.3.140.0070.03314.61
5.3.130.0030.08014.57
5.3.120.0070.04314.58
5.3.110.0030.04714.71
5.3.100.0070.03714.11
5.3.90.0030.04014.04
5.3.80.0100.06013.97
5.3.70.0070.06314.09
5.3.60.0070.03314.08
5.3.50.0000.07013.90
5.3.40.0030.08014.00
5.3.30.0070.06713.99
5.3.20.0100.07313.86
5.3.10.0000.04313.82
5.3.00.0000.06013.59
5.2.170.0070.06011.08
5.2.160.0070.06011.21
5.2.150.0000.06711.11
5.2.140.0070.05711.15
5.2.130.0000.04011.06
5.2.120.0070.06011.06
5.2.110.0030.05311.12
5.2.100.0130.03011.11
5.2.90.0100.04711.00
5.2.80.0130.05711.25
5.2.70.0070.06311.18
5.2.60.0130.05311.20
5.2.50.0070.04010.91
5.2.40.0070.06010.97
5.2.30.0070.04010.90
5.2.20.0170.03011.04
5.2.10.0030.05010.88
5.2.00.0070.06010.73
5.1.60.0070.03710.16
5.1.50.0030.05710.15
5.1.40.0070.0509.98
5.1.30.0030.06010.49
5.1.20.0030.05010.42
5.1.10.0070.05710.23
5.1.00.0070.04710.07
5.0.50.0070.0408.62
5.0.40.0000.0408.48
5.0.30.0000.0678.24
5.0.20.0070.0438.36
5.0.10.0070.0438.23
5.0.00.0070.0578.31
4.4.90.0070.0207.89
4.4.80.0030.0277.89
4.4.70.0030.0377.89
4.4.60.0000.0207.89
4.4.50.0070.0307.89
4.4.40.0030.0537.89
4.4.30.0000.0277.89
4.4.20.0130.0277.89
4.4.10.0000.0337.89
4.4.00.0000.0337.89
4.3.110.0030.0307.89
4.3.100.0070.0107.89
4.3.90.0030.0377.89
4.3.80.0030.0307.89
4.3.70.0100.0277.89
4.3.60.0000.0177.89
4.3.50.0000.0177.89
4.3.40.0000.0277.89
4.3.30.0000.0277.89
4.3.20.0000.0237.89
4.3.10.0000.0307.89
4.3.00.0000.0377.89

preferences:
47.18 ms | 401 KiB | 5 Q