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); } protected static function replace($matches) { return sprintf(self::$mask, $matches[0]); } } abstract class MyModule extends Module { protected 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.60.0110.00716.88
8.3.50.0100.00722.05
8.3.40.0120.00319.00
8.3.30.0120.00819.22
8.3.20.0050.00320.34
8.3.10.0040.00423.48
8.3.00.0080.00018.99
8.2.180.0070.01416.63
8.2.170.0080.00822.96
8.2.160.0100.00320.52
8.2.150.0060.00324.18
8.2.140.0000.00824.66
8.2.130.0080.00026.16
8.2.120.0080.00021.10
8.2.110.0040.00422.14
8.2.100.0000.01219.88
8.2.90.0080.00019.17
8.2.80.0000.00817.97
8.2.70.0030.00617.88
8.2.60.0050.00317.93
8.2.50.0030.00918.07
8.2.40.0030.00520.19
8.2.30.0040.00418.39
8.2.20.0040.00417.84
8.2.10.0080.00018.01
8.2.00.0030.00817.71
8.1.280.0040.01125.92
8.1.270.0000.00824.01
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0030.00624.02
8.1.230.0040.00719.21
8.1.220.0060.00317.78
8.1.210.0070.00318.77
8.1.200.0000.01317.23
8.1.190.0070.00417.25
8.1.180.0100.00018.10
8.1.170.0120.00018.59
8.1.160.0080.00022.03
8.1.150.0000.00718.59
8.1.140.0040.00417.48
8.1.130.0000.00717.79
8.1.120.0040.00417.39
8.1.110.0000.00717.48
8.1.100.0040.00417.38
8.1.90.0000.00817.44
8.1.80.0000.00817.45
8.1.70.0070.00017.46
8.1.60.0060.00317.70
8.1.50.0070.00317.61
8.1.40.0040.00417.48
8.1.30.0030.00517.68
8.1.20.0080.00017.73
8.1.10.0040.00417.60
8.1.00.0000.00717.58
8.0.300.0040.00418.77
8.0.290.0000.00817.04
8.0.280.0000.00718.48
8.0.270.0050.00217.19
8.0.260.0030.00317.28
8.0.250.0070.00017.07
8.0.240.0030.00317.11
8.0.230.0030.00317.00
8.0.220.0000.00716.89
8.0.210.0070.00016.88
8.0.200.0000.00917.04
8.0.190.0040.00417.05
8.0.180.0000.00716.98
8.0.170.0000.00816.97
8.0.160.0000.00817.00
8.0.150.0040.00416.82
8.0.140.0120.00016.76
8.0.130.0000.00513.40
8.0.120.0000.00816.74
8.0.110.0000.00716.82
8.0.100.0000.00816.87
8.0.90.0080.00016.81
8.0.80.0100.01016.96
8.0.70.0000.00816.97
8.0.60.0070.00016.91
8.0.50.0000.00716.90
8.0.30.0090.00917.25
8.0.20.0110.00817.47
8.0.10.0000.00817.03
8.0.00.0010.01716.96
7.4.330.0050.00015.04
7.4.320.0030.00316.71
7.4.300.0000.00616.67
7.4.290.0050.00316.75
7.4.280.0040.00416.75
7.4.270.0030.00316.66
7.4.260.0030.00316.64
7.4.250.0030.00616.69
7.4.240.0020.00516.64
7.4.230.0070.00016.66
7.4.220.0060.01016.77
7.4.210.0070.00816.64
7.4.200.0030.00316.48
7.4.190.0000.00716.93
7.4.160.0060.00916.61
7.4.150.0090.00917.40
7.4.140.0130.00717.86
7.4.130.0120.00816.78
7.4.120.0140.00316.59
7.4.110.0070.01016.57
7.4.100.0090.00916.39
7.4.90.0090.00916.49
7.4.80.0110.00719.39
7.4.70.0050.01116.35
7.4.60.0130.00316.88
7.4.50.0090.00016.72
7.4.40.0090.00616.77
7.4.30.0060.01016.66
7.4.00.0070.01015.00
7.3.330.0050.00013.38
7.3.320.0060.00013.44
7.3.310.0030.00316.37
7.3.300.0030.00316.42
7.3.290.0070.01016.45
7.3.280.0100.01016.40
7.3.270.0080.00817.40
7.3.260.0060.01016.58
7.3.250.0070.01016.66
7.3.240.0060.01216.80
7.3.230.0030.01316.67
7.3.210.0090.01216.54
7.3.200.0130.01019.39
7.3.190.0100.01016.59
7.3.180.0000.01716.48
7.3.170.0060.01016.41
7.3.160.0040.01216.68
7.3.120.0050.01114.89
7.3.110.0080.00914.79
7.3.100.0100.00514.87
7.3.90.0110.00315.04
7.3.80.0000.01315.07
7.3.70.0040.00715.04
7.3.60.0020.01115.08
7.3.50.0030.01014.91
7.3.40.0070.00314.88
7.3.30.0070.00815.02
7.3.20.0060.00816.79
7.3.10.0030.00916.80
7.3.00.0050.00916.78
7.2.330.0160.00416.86
7.2.320.0130.00316.85
7.2.310.0060.01616.80
7.2.300.0030.01316.78
7.2.290.0210.00016.78
7.2.250.0060.01215.11
7.2.240.0130.00715.28
7.2.230.0060.01215.04
7.2.220.0070.00815.15
7.2.210.0100.00515.24
7.2.200.0040.00915.17
7.2.190.0100.00215.08
7.2.180.0080.00515.21
7.2.170.0060.00615.02
7.2.130.0100.00716.90
7.2.120.0030.00816.77
7.2.110.0070.00717.16
7.2.100.0000.01416.91
7.2.90.0060.00317.02
7.2.80.0040.01117.29
7.2.70.0040.01117.10
7.2.60.0030.01016.73
7.2.50.0080.00317.09
7.2.40.0030.00917.10
7.2.30.0060.00617.29
7.2.20.0030.00717.11
7.2.10.0030.00616.80
7.2.00.0030.00918.34
7.1.330.0050.00916.04
7.1.320.0030.00915.97
7.1.310.0070.00715.85
7.1.300.0050.01115.77
7.1.290.0030.01016.12
7.1.280.0040.01015.94
7.1.270.0000.01415.96
7.1.260.0060.00815.91
7.1.250.0050.00816.01
7.1.200.0080.00416.03
7.1.100.0130.00318.35
7.1.70.0050.00517.21
7.1.60.0100.01419.46
7.1.50.0100.01017.07
7.1.00.0030.07322.49
7.0.200.0030.01316.86
7.0.140.0070.07022.18
7.0.110.0030.05319.93
7.0.100.0000.08720.00
7.0.90.0170.07020.01
7.0.80.0070.08719.92
7.0.70.0000.08319.87
7.0.60.0030.08320.00
7.0.50.0070.07320.46
7.0.40.0170.07720.24
7.0.30.0100.07320.24
7.0.20.0070.07720.22
7.0.10.0070.07020.09
7.0.00.0030.07720.21
5.6.250.0070.08320.67
5.6.240.0030.08720.64
5.6.230.0170.07720.69
5.6.220.0000.07320.68
5.6.210.0130.08020.36
5.6.200.0070.05720.94
5.6.190.0100.06321.28
5.6.180.0130.06721.23
5.6.170.0000.05321.09
5.6.160.0100.07721.13
5.6.150.0100.07721.20
5.6.140.0030.08021.19
5.6.130.0030.08720.93
5.6.120.0030.08721.06
5.6.110.0100.06720.90
5.6.100.0030.04321.25
5.6.90.0100.07721.05
5.6.80.0070.07020.51
5.6.70.0100.07020.64
5.6.60.0100.07720.43
5.6.50.0030.05320.41
5.6.40.0070.05020.30
5.6.30.0100.07320.51
5.6.20.0030.08020.35
5.6.10.0030.08020.63
5.6.00.0030.04720.54
5.5.380.0130.06320.55
5.5.370.0100.07020.37
5.5.360.0170.06720.46
5.5.350.0030.07320.16
5.5.340.0200.06720.83
5.5.330.0030.05020.70
5.5.320.0130.07320.95
5.5.310.0130.08020.91
5.5.300.0070.05021.03
5.5.290.0030.04720.97
5.5.280.0070.04720.91
5.5.270.0130.04320.97
5.5.260.0030.05020.96
5.5.250.0170.06720.84
5.5.240.0000.05320.30
5.5.230.0130.06720.27
5.5.220.0100.07720.29
5.5.210.0070.06720.27
5.5.200.0130.07720.23
5.5.190.0030.08020.17
5.5.180.0130.04320.31
5.5.160.0100.07320.26
5.5.150.0070.07320.24
5.5.140.0030.08320.39
5.5.130.0070.05720.15
5.5.120.0130.07320.34
5.5.110.0100.07020.21
5.5.100.0000.08720.27
5.5.90.0070.08020.24
5.5.80.0200.06720.23
5.5.70.0200.06720.08
5.5.60.0070.04720.22
5.5.50.0030.07720.07
5.5.40.0070.07720.01
5.5.30.0200.04319.98
5.5.20.0100.05319.97
5.5.10.0130.03719.93
5.5.00.0230.07020.06
5.4.450.0100.07719.32
5.4.440.0130.08019.50
5.4.430.0000.08319.31
5.4.420.0070.05319.63
5.4.410.0030.07719.21
5.4.400.0100.07318.95
5.4.390.0000.08019.03
5.4.380.0000.06319.23
5.4.370.0130.06719.18
5.4.360.0030.08019.09
5.4.350.0070.07019.31
5.4.340.0200.04018.99
5.4.320.0100.07019.23
5.4.310.0000.05319.18
5.4.300.0070.07318.95
5.4.290.0030.08018.99
5.4.280.0200.07019.00
5.4.270.0100.04018.95
5.4.260.0030.06719.16
5.4.250.0030.07719.25
5.4.240.0030.08019.22
5.4.230.0030.08019.17
5.4.220.0070.07319.09
5.4.210.0130.07019.17
5.4.200.0030.07719.13
5.4.190.0070.07719.00
5.4.180.0030.06319.16
5.4.170.0100.07019.32
5.4.160.0070.08018.98
5.4.150.0130.07019.07
5.4.140.0000.08016.41
5.4.130.0070.07016.41
5.4.120.0070.06716.48
5.4.110.0030.07016.48
5.4.100.0070.06316.46
5.4.90.0070.07016.47
5.4.80.0000.07016.57
5.4.70.0030.04716.45
5.4.60.0100.06316.45
5.4.50.0100.07016.24
5.4.40.0070.07016.34
5.4.30.0030.05016.52
5.4.20.0030.07716.53
5.4.10.0130.06716.33
5.4.00.0000.07315.82
5.3.290.0100.07014.63
5.3.280.0070.06314.63
5.3.270.0100.05014.74
5.3.260.0100.08014.60
5.3.250.0130.06714.74
5.3.240.0000.07314.61
5.3.230.0000.08014.46
5.3.220.0030.08014.59
5.3.210.0100.07314.43
5.3.200.0070.07314.70
5.3.190.0100.08014.57
5.3.180.0030.07714.59
5.3.170.0070.05014.66
5.3.160.0130.03714.53
5.3.150.0100.06714.44
5.3.140.0030.04714.41
5.3.130.0070.06014.43
5.3.120.0070.07714.78
5.3.110.0070.07714.57
5.3.100.0070.08014.18
5.3.90.0070.07714.04
5.3.80.0070.07014.03
5.3.70.0030.07314.03
5.3.60.0070.04014.02
5.3.50.0030.07313.91
5.3.40.0070.07314.09
5.3.30.0070.07314.05
5.3.20.0030.08013.82
5.3.10.0030.07013.74
5.3.00.0030.07313.66
5.2.170.0100.06011.17
5.2.160.0100.05711.11
5.2.150.0070.06311.23
5.2.140.0070.06011.23
5.2.130.0130.05011.12
5.2.120.0100.05711.34
5.2.110.0000.06011.23
5.2.100.0030.03011.09
5.2.90.0030.06011.20
5.2.80.0030.06311.09
5.2.70.0070.06311.24
5.2.60.0100.05711.20
5.2.50.0130.05311.04
5.2.40.0030.06310.99
5.2.30.0070.05710.98
5.2.20.0070.06010.97
5.2.10.0030.06011.00
5.2.00.0070.05710.71
5.1.60.0100.04710.66
5.1.50.0030.04710.66
5.1.40.0030.05710.66
5.1.30.0100.05310.66
5.1.20.0030.05710.66
5.1.10.0030.05710.66
5.1.00.0030.05710.66
5.0.50.0100.03710.66
5.0.40.0070.04010.66
5.0.30.0070.05310.66
5.0.20.0070.04010.66
5.0.10.0030.04310.66
5.0.00.0030.06310.66
4.4.90.0030.03310.66
4.4.80.0070.03310.66
4.4.70.0030.03310.66
4.4.60.0070.03310.66
4.4.50.0000.03710.66
4.4.40.0000.05310.66
4.4.30.0000.03710.66
4.4.20.0030.03010.66
4.4.10.0030.03710.66
4.4.00.0000.05710.66
4.3.110.0000.03710.66
4.3.100.0030.03310.66
4.3.90.0030.03010.66
4.3.80.0030.05010.66
4.3.70.0000.03710.66
4.3.60.0030.03310.66
4.3.50.0030.03310.66
4.3.40.0030.05010.66
4.3.30.0030.03310.66
4.3.20.0030.03010.66
4.3.10.0000.02710.66
4.3.00.0000.03710.66

preferences:
51.65 ms | 401 KiB | 5 Q