3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Greeting { private static $message; public static function greet() { echo $this->message; } public static function __init($message) { static::$message = $message; } } class GreetingFactory { public static function createGreeting($message) { Greeting::__init($message); return 'Greeting'; } } class GreetingFactoryManager { private static $greetingFactory; public static function getInstance() { if (static::$greetingFactory === null) static::$greetingFactory = 'GreetingFactory'; return static::$greetingFactory; } } $greeterFactory = GreetingFactoryManager::getInstance(); $greeter = $greeterFactory::createGreeting('G\' morning'); $greeter::greet();

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.0070.00717.00
8.3.50.0050.01122.82
8.3.40.0090.00618.86
8.3.30.0110.00619.17
8.3.20.0070.00020.33
8.3.10.0040.00421.60
8.3.00.0080.00017.75
8.2.180.0140.00716.88
8.2.170.0090.00922.96
8.2.160.0070.00722.11
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0050.00326.16
8.2.120.0080.00020.85
8.2.110.0000.01021.08
8.2.100.0100.00317.89
8.2.90.0080.00019.15
8.2.80.0000.00917.97
8.2.70.0000.00917.63
8.2.60.0030.01017.80
8.2.50.0030.00618.07
8.2.40.0040.00818.09
8.2.30.0070.00018.07
8.2.20.0030.00617.66
8.2.10.0000.00917.89
8.2.00.0040.00417.83
8.1.280.0140.00725.92
8.1.270.0040.00423.97
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0090.00021.38
8.1.230.0000.01119.55
8.1.220.0000.00817.74
8.1.210.0050.00318.77
8.1.200.0070.00317.35
8.1.190.0000.00917.23
8.1.180.0000.00818.10
8.1.170.0080.00018.34
8.1.160.0040.00421.87
8.1.150.0000.00718.89
8.1.140.0000.00717.32
8.1.130.0000.00717.41
8.1.120.0040.00417.45
8.1.110.0070.00017.44
8.1.100.0040.00417.30
8.1.90.0000.00717.38
8.1.80.0000.00817.48
8.1.70.0030.00317.37
8.1.60.0000.00917.64
8.1.50.0040.00417.56
8.1.40.0000.00817.54
8.1.30.0000.00817.62
8.1.20.0040.00417.65
8.1.10.0050.00317.58
8.1.00.0000.00717.60
8.0.300.0020.00518.77
8.0.290.0000.00916.63
8.0.280.0000.00718.30
8.0.270.0030.00617.21
8.0.260.0060.00016.87
8.0.250.0000.00717.00
8.0.240.0060.00316.99
8.0.230.0040.00416.95
8.0.220.0030.00316.98
8.0.210.0000.00716.79
8.0.200.0000.00817.03
8.0.190.0000.00816.93
8.0.180.0090.00016.97
8.0.170.0000.00816.89
8.0.160.0040.00416.91
8.0.150.0050.00316.82
8.0.140.0060.00316.87
8.0.130.0030.00313.31
8.0.120.0040.00416.86
8.0.110.0000.00816.80
8.0.100.0040.00416.76
8.0.90.0040.00416.78
8.0.80.0180.00416.84
8.0.70.0040.00416.95
8.0.60.0050.00316.80
8.0.50.0040.00416.73
8.0.30.0090.00917.29
8.0.20.0120.01117.40
8.0.10.0040.00416.82
8.0.00.0090.01416.66
7.4.330.0000.00515.10
7.4.320.0030.00316.48
7.4.300.0060.00016.61
7.4.290.0040.00416.48
7.4.280.0080.00016.46
7.4.270.0030.00316.52
7.4.260.0070.00016.59
7.4.250.0030.00316.55
7.4.240.0020.00516.62
7.4.230.0000.00716.36
7.4.220.0110.01116.64
7.4.210.0090.00616.51
7.4.200.0060.00316.66
7.4.160.0080.00816.46
7.4.150.0170.00717.40
7.4.140.0090.00917.86
7.4.130.0130.00416.57
7.4.120.0090.00816.64
7.4.110.0040.01216.59
7.4.100.0100.00716.73
7.4.90.0030.01316.59
7.4.80.0140.00319.39
7.4.70.0100.00716.70
7.4.60.0120.00916.50
7.4.50.0000.00816.75
7.4.40.0090.00616.41
7.4.30.0060.01016.48
7.4.00.0000.01414.72
7.3.330.0000.00613.30
7.3.320.0030.00313.25
7.3.310.0060.00016.25
7.3.300.0000.00616.39
7.3.290.0130.00016.40
7.3.280.0050.01216.39
7.3.270.0140.00317.40
7.3.260.0060.01116.69
7.3.250.0150.00516.58
7.3.240.0070.01116.62
7.3.230.0070.01016.66
7.3.210.0120.00616.43
7.3.200.0080.01219.39
7.3.190.0090.00916.49
7.3.180.0120.00916.36
7.3.170.0100.01316.34
7.3.160.0070.00716.44
7.3.10.0140.00716.60
7.3.00.0130.00716.41
7.2.330.0160.00316.70
7.2.320.0130.01616.52
7.2.310.0140.00316.79
7.2.300.0120.00416.58
7.2.290.0070.01016.71
7.2.130.0030.00916.36
7.2.120.0050.00516.56
7.2.110.0060.00816.71
7.2.100.0080.01516.63
7.2.90.0040.01316.62
7.2.80.0220.00216.60
7.2.70.0090.00916.79
7.2.60.0100.00716.69
7.2.50.0030.00916.49
7.2.40.0490.00716.53
7.2.30.0150.00316.48
7.2.20.0110.01116.72
7.2.10.0110.00616.56
7.2.00.0160.00818.17
7.1.250.0000.01515.51
7.1.200.0060.00615.70
7.1.100.0040.00718.26
7.1.70.0100.00617.04
7.1.60.0130.00019.40
7.1.50.0090.00316.98
7.1.00.0030.07722.40
7.0.200.0000.00916.73
7.0.140.0000.07721.92
7.0.110.0130.08019.97
7.0.100.0170.07019.89
7.0.90.0100.08319.95
7.0.80.0070.05319.84
7.0.70.0130.07020.02
7.0.60.0000.08719.67
7.0.50.0130.07720.01
7.0.40.0030.08019.65
7.0.30.0100.08019.66
7.0.20.0130.05719.87
7.0.10.0070.07719.65
7.0.00.0070.04319.87
5.6.280.0100.06721.16
5.6.260.0100.08020.76
5.6.250.0100.07320.73
5.6.240.0030.08020.70
5.6.230.0030.06720.55
5.6.220.0130.08020.55
5.6.210.0230.06720.66
5.6.200.0070.08020.69
5.6.190.0030.09020.71
5.6.180.0100.07720.86
5.6.170.0170.06720.69
5.6.160.0070.08320.56
5.6.150.0070.06720.71
5.6.140.0100.04720.61
5.6.130.0070.08020.70
5.6.120.0030.07720.55
5.6.110.0130.07320.59
5.6.100.0130.07320.46
5.6.90.0000.08320.64
5.6.80.0100.07320.01
5.6.70.0030.07719.99
5.6.60.0130.04719.94
5.6.50.0030.08320.09
5.6.40.0030.08019.92
5.6.30.0130.06719.88
5.6.20.0100.07319.97
5.6.10.0000.08320.02
5.6.00.0070.06719.96
5.5.380.0100.08017.55
5.5.370.0000.05017.68
5.5.360.0070.07717.58
5.5.350.0030.08317.53
5.5.340.0030.08017.84
5.5.330.0170.07018.23
5.5.320.0070.04317.93
5.5.310.0130.04318.09
5.5.300.0030.07718.25
5.5.290.0030.08318.12
5.5.280.0070.08017.83
5.5.270.0000.08718.10
5.5.260.0070.08018.23
5.5.250.0070.07317.91
5.5.240.0130.06717.34
5.5.230.0030.08017.31
5.5.220.0030.06017.30
5.5.210.0130.07017.48
5.5.200.0200.05717.31
5.5.190.0100.07317.43
5.5.180.0070.07717.28
5.5.160.0030.07717.43
5.5.150.0070.04317.30
5.5.140.0170.06717.57
5.5.130.0070.08017.49
5.5.120.0070.05317.57
5.5.110.0170.05017.39
5.5.100.0030.08017.18
5.5.90.0100.07317.17
5.5.80.0100.06717.21
5.5.70.0170.06317.33
5.5.60.0070.07017.36
5.5.50.0100.07317.34
5.5.40.0030.05317.15
5.5.30.0030.04717.33
5.5.20.0070.07317.33
5.5.10.0130.07317.34
5.5.00.0130.03017.36
5.4.450.0030.07719.55
5.4.440.0130.07019.29
5.4.430.0070.07719.35
5.4.420.0170.06319.33
5.4.410.0130.03719.20
5.4.400.0070.07318.95
5.4.390.0100.04319.04
5.4.380.0130.07019.00
5.4.370.0070.07019.14
5.4.360.0130.06319.17
5.4.350.0100.07018.99
5.4.340.0100.07319.09
5.4.320.0000.08019.22
5.4.310.0100.07319.01
5.4.300.0030.07719.24
5.4.290.0070.05719.24
5.4.280.0170.06719.24
5.4.270.0070.08019.14
5.4.260.0200.06718.99
5.4.250.0100.07019.14
5.4.240.0100.04319.33
5.4.230.0030.06319.01
5.4.220.0000.08319.01
5.4.210.0030.07319.17
5.4.200.0130.07019.25
5.4.190.0100.07719.32
5.4.180.0070.07018.99
5.4.170.0070.07319.13
5.4.160.0030.08018.96
5.4.150.0070.07719.29
5.4.140.0100.06716.49
5.4.130.0100.07016.63
5.4.120.0070.03716.62
5.4.110.0030.07316.38
5.4.100.0000.05716.56
5.4.90.0000.07716.55
5.4.80.0030.07016.40
5.4.70.0030.06316.51
5.4.60.0030.06716.45
5.4.50.0070.07016.39
5.4.40.0030.07716.44
5.4.30.0170.06316.46
5.4.20.0070.04016.51
5.4.10.0200.02716.44
5.4.00.0030.07715.90
5.3.290.0130.06314.67
5.3.280.0000.04014.69
5.3.270.0070.08014.85
5.3.260.0100.06314.70
5.3.250.0070.07714.70
5.3.240.0070.07714.61
5.3.230.0000.07314.61
5.3.220.0070.07314.80
5.3.210.0030.04014.71
5.3.200.0100.06714.67
5.3.190.0030.04014.53
5.3.180.0130.06314.69
5.3.170.0100.07014.79
5.3.160.0030.08014.59
5.3.150.0130.06714.59
5.3.140.0070.07314.55
5.3.130.0200.06014.56
5.3.120.0230.05314.68
5.3.110.0070.07714.51
5.3.100.0100.06014.06
5.3.90.0070.07314.26
5.3.80.0030.07314.02
5.3.70.0030.04314.02
5.3.60.0130.06714.25
5.3.50.0000.04014.06
5.3.40.0070.08014.04
5.3.30.0100.06313.92
5.3.20.0030.04013.78
5.3.10.0070.07313.66
5.3.00.0070.07013.79
5.2.170.0030.05311.15
5.2.160.0030.05311.27
5.2.150.0000.04011.13
5.2.140.0000.04011.13
5.2.130.0000.05711.09
5.2.120.0030.06011.11
5.2.110.0100.05011.18
5.2.100.0030.04311.18
5.2.90.0030.05711.10
5.2.80.0100.05710.95
5.2.70.0170.03311.16
5.2.60.0100.05311.14
5.2.50.0030.06010.89
5.2.40.0100.05711.08
5.2.30.0030.06010.99
5.2.20.0070.05711.04
5.2.10.0070.06010.89
5.2.00.0070.05010.68
5.1.60.0030.05310.02
5.1.50.0070.05310.00
5.1.40.0030.05310.23
5.1.30.0070.05010.34
5.1.20.0070.05710.38
5.1.10.0030.05710.06
5.1.00.0070.04310.08
5.0.50.0030.0479.88
5.0.40.0070.0409.88
5.0.30.0030.0639.88
5.0.20.0030.0279.88
5.0.10.0000.0439.88
5.0.00.0070.0539.88
4.4.90.0030.0339.88
4.4.80.0030.0339.88
4.4.70.0000.0379.88
4.4.60.0070.0339.88
4.4.50.0000.0339.88
4.4.40.0000.0539.88
4.4.30.0070.0309.88
4.4.20.0000.0379.88
4.4.10.0000.0339.88
4.4.00.0030.0379.88
4.3.110.0030.0339.88
4.3.100.0000.0379.88
4.3.90.0000.0339.88
4.3.80.0000.0409.88
4.3.70.0000.0339.88
4.3.60.0030.0339.88
4.3.50.0070.0339.88
4.3.40.0030.0539.88
4.3.30.0000.0379.88
4.3.20.0000.0379.88
4.3.10.0000.0279.88
4.3.00.0030.0279.88

preferences:
37.81 ms | 401 KiB | 5 Q