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', 'self::replace'), $it); } protected static function replace($matches) { return sprintf(self::$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.60.0090.00516.75
8.3.50.0110.00722.03
8.3.40.0150.00318.80
8.3.30.0040.01119.07
8.3.20.0000.00820.33
8.3.10.0040.00423.53
8.3.00.0060.00319.63
8.2.180.0120.00616.75
8.2.170.0110.00422.96
8.2.160.0100.00320.35
8.2.150.0000.00824.18
8.2.140.0030.00524.66
8.2.130.0070.00726.16
8.2.120.0040.00822.24
8.2.110.0050.00522.20
8.2.100.0060.00617.97
8.2.90.0040.00419.30
8.2.80.0090.00018.05
8.2.70.0040.00417.75
8.2.60.0040.00418.05
8.2.50.0060.00318.07
8.2.40.0030.00618.34
8.2.30.0040.00418.21
8.2.20.0060.00317.94
8.2.10.0000.00718.05
8.2.00.0000.00817.82
8.1.280.0070.00725.92
8.1.270.0160.00023.89
8.1.260.0000.00726.35
8.1.250.0040.00428.09
8.1.240.0000.00823.70
8.1.230.0060.00618.97
8.1.220.0050.00317.74
8.1.210.0030.00518.77
8.1.200.0040.00417.35
8.1.190.0070.00017.43
8.1.180.0080.00018.10
8.1.170.0080.00018.71
8.1.160.0030.00621.96
8.1.150.0040.00418.66
8.1.140.0080.00017.39
8.1.130.0000.00717.79
8.1.120.0040.00417.40
8.1.110.0040.00417.38
8.1.100.0040.00417.52
8.1.90.0050.00317.44
8.1.80.0000.00717.47
8.1.70.0030.00317.36
8.1.60.0030.00617.50
8.1.50.0000.00717.61
8.1.40.0000.00717.60
8.1.30.0030.00517.61
8.1.20.0000.00817.76
8.1.10.0040.00417.62
8.1.00.0030.00617.58
8.0.300.0040.00418.77
8.0.290.0030.00617.16
8.0.280.0070.00018.39
8.0.270.0030.00317.20
8.0.260.0030.00316.93
8.0.250.0030.00317.13
8.0.240.0050.00317.06
8.0.230.0070.00017.01
8.0.220.0000.00716.94
8.0.210.0040.00417.00
8.0.200.0000.00716.96
8.0.190.0030.00517.00
8.0.180.0000.00717.00
8.0.170.0050.00317.07
8.0.160.0020.00517.04
8.0.150.0050.00316.79
8.0.140.0030.00616.88
8.0.130.0000.00513.41
8.0.120.0000.00816.89
8.0.110.0000.00716.95
8.0.100.0000.00716.74
8.0.90.0000.00716.80
8.0.80.0070.01416.91
8.0.70.0070.00016.88
8.0.60.0040.00416.80
8.0.50.0040.00416.71
8.0.30.0070.01217.29
8.0.20.0090.00917.40
8.0.10.0000.00716.88
8.0.00.0120.00616.79
7.4.330.0000.00715.00
7.4.320.0000.00616.48
7.4.300.0030.00316.77
7.4.290.0030.00616.76
7.4.280.0050.00216.63
7.4.270.0030.00316.66
7.4.260.0040.00416.63
7.4.250.0000.00816.67
7.4.240.0000.00716.67
7.4.230.0000.00716.62
7.4.220.0100.00716.60
7.4.210.0040.01016.67
7.4.200.0070.00016.63
7.4.190.0070.00016.89
7.4.160.0070.01016.63
7.4.150.0070.01017.40
7.4.140.0060.01117.86
7.4.130.0130.00416.67
7.4.120.0080.01016.65
7.4.110.0100.01016.59
7.4.100.0070.01416.48
7.4.90.0160.00016.79
7.4.80.0040.01419.39
7.4.70.0100.01116.68
7.4.60.0100.00616.64
7.4.50.0000.00916.62
7.4.40.0050.00522.77
7.4.30.0110.00716.63
7.3.330.0000.00613.52
7.3.320.0030.00313.27
7.3.310.0000.00716.37
7.3.300.0000.00716.53
7.3.290.0100.01116.47
7.3.280.0080.01016.43
7.3.270.0160.00317.40
7.3.260.0120.00616.73
7.3.250.0030.01716.52
7.3.240.0080.01216.50
7.3.230.0110.00516.77
7.3.210.0060.01216.53
7.3.200.0120.00619.39
7.3.190.0100.01116.38
7.3.180.0000.01616.34
7.3.170.0110.01216.52
7.3.160.0120.00316.37
7.2.330.0090.01016.79
7.2.320.0080.01516.80
7.2.310.0030.01916.88
7.2.300.0070.01416.75
7.2.290.0110.01116.66
7.1.00.0000.08022.32
7.0.140.0100.06722.18
5.6.280.0070.07021.00
5.6.110.0030.05320.96
5.6.100.0030.04720.92
5.6.90.0070.04721.00
5.6.80.0070.04320.43
5.6.70.0170.06720.43
5.6.60.0070.04320.43
5.6.50.0000.05720.49
5.6.40.0030.04020.44
5.6.30.0030.04020.39
5.6.20.0070.05020.25
5.6.10.0130.03320.37
5.6.00.0100.04020.45
5.5.270.0130.06320.77
5.5.260.0130.06320.91
5.5.250.0070.08320.70
5.5.240.0100.05020.28
5.5.230.0130.05720.19
5.5.220.0070.05020.16
5.5.210.0070.05020.27
5.5.200.0070.03720.13
5.5.190.0030.05320.15
5.5.180.0100.07720.13
5.5.160.0130.07020.00
5.5.150.0100.05720.00
5.5.140.0130.06720.18
5.5.130.0070.08320.08
5.5.120.0070.08020.11
5.5.110.0100.06720.08
5.5.100.0030.08320.11
5.5.90.0070.03720.13
5.5.80.0030.07720.18
5.5.70.0030.04020.10
5.5.60.0130.07320.13
5.5.50.0000.04320.07
5.5.40.0070.04720.15
5.5.30.0130.07020.16
5.5.20.0100.03720.11
5.5.10.0070.06320.07
5.5.00.0100.05720.08
5.4.430.0030.07719.55
5.4.420.0000.08719.19
5.4.410.0100.05319.39
5.4.400.0130.03718.91
5.4.390.0070.06318.90
5.4.380.0100.07019.13
5.4.370.0030.06719.03
5.4.360.0000.04319.21
5.4.350.0070.04319.04
5.4.340.0070.05019.05
5.4.320.0070.03719.13
5.4.310.0030.06319.03
5.4.300.0030.04319.05
5.4.290.0130.07019.04
5.4.280.0070.07319.04
5.4.270.0000.08019.22
5.4.260.0070.05319.23
5.4.250.0000.04018.86
5.4.240.0030.06719.20
5.4.230.0030.06718.87
5.4.220.0030.08018.94
5.4.210.0000.07018.88
5.4.200.0100.07319.20
5.4.190.0000.04319.03
5.4.180.0170.04719.15
5.4.170.0030.07719.22
5.4.160.0070.03319.02
5.4.150.0100.05018.93
5.4.140.0000.03716.46
5.4.130.0100.07316.41
5.4.120.0100.07716.33
5.4.110.0000.04016.55
5.4.100.0030.06316.38
5.4.90.0100.03016.55
5.4.80.0130.06016.52
5.4.70.0100.04716.30
5.4.60.0030.03316.41
5.4.50.0130.06016.47
5.4.40.0070.08016.46
5.4.30.0070.07016.31
5.4.20.0030.06316.47
5.4.10.0030.07316.33
5.4.00.0070.06015.81
5.3.290.0030.05715.60
5.3.280.0030.07715.60
5.3.270.0030.06315.60
5.3.260.0070.04315.60
5.3.250.0070.04015.60
5.3.240.0070.03715.60
5.3.230.0070.03015.60
5.3.220.0070.07015.60
5.3.210.0070.05315.60
5.3.200.0030.07715.60
5.3.190.0100.07315.60
5.3.180.0030.07715.60
5.3.170.0030.03715.60
5.3.160.0070.03715.60
5.3.150.0030.06315.60
5.3.140.0100.07715.60
5.3.130.0070.03715.60
5.3.120.0000.04015.60
5.3.110.0070.07015.60
5.3.100.0100.06315.60
5.3.90.0070.05715.60
5.3.80.0000.04015.60
5.3.70.0070.04715.60
5.3.60.0070.03315.60
5.3.50.0030.04715.60
5.3.40.0100.06715.60
5.3.30.0100.03015.60
5.3.20.0030.04715.60
5.3.10.0130.06015.60
5.3.00.0030.04315.60
5.2.170.0000.06015.60
5.2.160.0030.05715.60
5.2.150.0030.03015.60
5.2.140.0070.02315.60
5.2.130.0100.03015.60
5.2.120.0030.03715.60
5.2.110.0100.05715.60
5.2.100.0000.04715.60
5.2.90.0030.05015.60
5.2.80.0030.06015.60
5.2.70.0100.04715.60
5.2.60.0000.03315.60
5.2.50.0030.05015.60
5.2.40.0000.03015.60
5.2.30.0130.05015.60
5.2.20.0130.05015.60
5.2.10.0100.04715.60
5.2.00.0030.03015.60
5.1.60.0070.05015.60
5.1.50.0030.05315.60
5.1.40.0070.02315.60
5.1.30.0030.04015.60
5.1.20.0030.03715.60
5.1.10.0070.03715.60
5.1.00.0000.04315.60
5.0.50.0000.03715.60
5.0.40.0030.02015.60
5.0.30.0030.06015.60
5.0.20.0030.03715.60
5.0.10.0000.02015.60
5.0.00.0000.06015.60
4.4.90.0030.01715.60
4.4.80.0030.02015.60
4.4.70.0000.02315.60
4.4.60.0030.03315.60
4.4.50.0030.03315.60
4.4.40.0000.05015.60
4.4.30.0030.01715.60
4.4.20.0070.02315.60
4.4.10.0000.04015.60
4.4.00.0030.05015.60
4.3.110.0070.02715.60
4.3.100.0000.03315.60
4.3.90.0070.02315.60
4.3.80.0030.03715.60
4.3.70.0070.01315.60
4.3.60.0030.02715.60
4.3.50.0000.03315.60
4.3.40.0030.03015.60
4.3.30.0030.01315.60
4.3.20.0000.02315.60
4.3.10.0000.02715.60
4.3.00.0030.03315.60

preferences:
43.09 ms | 401 KiB | 5 Q