3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Greeting { private static $message; public static function greet() { echo self::$message; } public static function __init($message) { self::$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) self::$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.0030.01016.63
8.3.50.0100.00723.05
8.3.40.0040.01118.77
8.3.30.0030.01019.22
8.3.20.0040.00420.16
8.3.10.0080.00021.93
8.3.00.0040.00417.63
8.2.180.0100.01016.75
8.2.170.0180.00322.96
8.2.160.0060.00920.43
8.2.150.0000.00724.18
8.2.140.0000.00824.66
8.2.130.0080.00026.16
8.2.120.0040.00421.05
8.2.110.0030.00721.10
8.2.100.0120.00017.57
8.2.90.0040.00419.08
8.2.80.0050.00317.97
8.2.70.0050.00317.50
8.2.60.0030.00718.04
8.2.50.0050.00518.07
8.2.40.0070.00318.22
8.2.30.0030.00618.14
8.2.20.0000.01017.80
8.2.10.0050.00317.95
8.2.00.0040.00417.64
8.1.280.0100.01025.92
8.1.270.0040.00423.69
8.1.260.0050.00226.35
8.1.250.0040.00428.09
8.1.240.0030.00722.13
8.1.230.0060.00620.89
8.1.220.0080.00018.77
8.1.210.0040.00419.07
8.1.200.0040.00417.34
8.1.190.0060.00317.23
8.1.180.0030.00518.10
8.1.170.0040.00418.49
8.1.160.0040.00421.89
8.1.150.0040.00418.77
8.1.140.0040.00417.36
8.1.130.0000.00817.89
8.1.120.0000.00817.43
8.1.110.0040.00417.40
8.1.100.0040.00417.42
8.1.90.0000.00717.46
8.1.80.0040.00417.40
8.1.70.0000.00717.38
8.1.60.0030.00517.59
8.1.50.0080.00017.53
8.1.40.0050.00217.46
8.1.30.0030.00617.71
8.1.20.0000.00717.50
8.1.10.0040.00417.50
8.1.00.0040.00417.54
8.0.300.0030.00519.86
8.0.290.0000.00716.63
8.0.280.0030.00518.46
8.0.270.0030.00617.34
8.0.260.0050.00317.27
8.0.250.0020.00517.02
8.0.240.0000.00917.03
8.0.230.0030.00316.76
8.0.220.0000.00716.89
8.0.210.0040.00416.68
8.0.200.0030.00316.86
8.0.190.0040.00416.86
8.0.180.0040.00416.89
8.0.170.0040.00416.93
8.0.160.0040.00416.84
8.0.150.0070.00016.88
8.0.140.0070.00316.70
8.0.130.0060.00013.21
8.0.120.0000.00716.68
8.0.110.0000.00716.90
8.0.100.0040.00416.79
8.0.90.0030.00516.75
8.0.80.0170.00416.73
8.0.70.0040.00416.81
8.0.60.0040.00416.82
8.0.50.0000.00816.64
8.0.30.0130.01017.31
8.0.20.0120.00617.40
8.0.10.0040.00417.00
8.0.00.0100.00816.84
7.4.330.0000.00515.00
7.4.320.0030.00316.62
7.4.300.0020.00516.61
7.4.290.0040.00416.59
7.4.280.0000.00816.61
7.4.270.0070.00016.54
7.4.260.0040.00416.60
7.4.250.0080.00016.49
7.4.240.0030.00416.53
7.4.230.0030.00316.71
7.4.220.0060.01516.57
7.4.210.0100.00616.64
7.4.200.0040.00416.68
7.4.160.0060.00916.68
7.4.150.0100.01017.40
7.4.140.0110.00817.86
7.4.130.0070.00916.60
7.4.120.0090.00816.51
7.4.110.0060.01216.49
7.4.100.0060.00916.67
7.4.90.0150.00316.59
7.4.80.0070.01019.39
7.4.70.0090.01216.66
7.4.60.0100.00716.60
7.4.50.0030.00616.37
7.4.40.0100.00616.57
7.4.30.0040.01816.44
7.4.00.0000.01415.02
7.3.330.0000.00513.45
7.3.320.0060.00013.45
7.3.310.0000.00716.40
7.3.300.0060.00016.42
7.3.290.0060.01316.39
7.3.280.0090.00816.34
7.3.270.0040.01317.40
7.3.260.0080.00816.35
7.3.250.0090.00916.43
7.3.240.0100.01016.61
7.3.230.0120.00616.59
7.3.210.0070.01416.39
7.3.200.0060.00919.39
7.3.190.0100.01016.34
7.3.180.0090.01016.49
7.3.170.0160.00616.37
7.3.160.0090.00616.43
7.2.330.0100.00716.86
7.2.320.0030.01316.46
7.2.310.0100.00716.54
7.2.300.0160.00016.63
7.2.290.0120.00316.94
7.2.00.0060.00919.39
7.1.100.0030.00717.89
7.1.70.0000.00816.88
7.1.60.0140.01119.40
7.1.50.0200.01334.78
7.1.00.0030.07722.33
7.0.200.0040.00416.46
7.0.140.0000.07021.98
7.0.60.0170.06320.02
7.0.50.0130.04317.99
7.0.40.0070.07020.24
7.0.30.0300.07320.08
7.0.20.0200.05320.42
7.0.10.0130.06320.10
7.0.00.0070.05320.33
5.6.280.0030.07320.87
5.6.210.0100.07320.72
5.6.200.0200.04318.24
5.6.190.0030.07020.64
5.6.180.3030.03320.52
5.6.170.0430.04720.55
5.6.160.0070.05720.54
5.6.150.0030.07318.30
5.6.140.0070.06718.23
5.6.130.0130.07318.15
5.6.120.0070.04721.05
5.6.110.0070.09020.99
5.6.100.0100.06321.14
5.6.90.0070.03720.97
5.6.80.0100.07720.29
5.5.350.0030.06320.41
5.5.340.0100.07018.02
5.5.330.0300.03320.42
5.5.320.0470.07020.31
5.5.310.0270.06720.35
5.5.300.0100.03318.08
5.5.290.0070.07718.01
5.5.280.0070.07320.86
5.5.270.0100.08320.90
5.5.260.0000.04320.88
5.5.250.0100.03320.63
5.5.240.0070.05320.16
5.4.450.0330.07319.44
5.4.440.0370.04019.46
5.4.430.0370.04319.44
5.4.420.0230.04319.39
5.4.410.0370.03319.34
5.4.400.0400.06319.16
5.4.390.0300.07318.88
5.4.380.0370.07318.91
5.4.370.0300.05019.12
5.4.360.0300.03719.06
5.4.350.0370.06319.08
5.4.340.0300.03718.98
5.4.320.0670.03019.15
5.4.310.0370.06019.12
5.4.300.0370.06718.85
5.4.290.0330.03718.87
5.4.280.0300.04718.93
5.4.270.0330.06719.11
5.4.260.0370.04018.93
5.4.250.0330.05318.92
5.4.240.0400.06718.97
5.4.230.0430.06318.95
5.4.220.0300.03718.98
5.4.210.0470.05718.97
5.4.200.0400.04318.98
5.4.190.0430.06019.14
5.4.180.0400.04319.10
5.4.170.0270.04318.95
5.4.160.0270.04019.13
5.4.150.0300.06319.04
5.4.140.0330.04716.38
5.4.130.0300.03716.39
5.4.120.0300.04016.33
5.4.110.0300.07016.59
5.4.100.0300.04716.61
5.4.90.0470.05316.63
5.4.80.0430.06316.56
5.4.70.0430.04316.59
5.4.60.0370.04316.43
5.4.50.0330.05016.25
5.4.40.0270.03316.52
5.4.30.0270.03016.43
5.4.20.0330.05716.34
5.4.10.0470.03016.25
5.4.00.0300.05315.93
5.3.290.0330.06314.59
5.3.280.0370.05014.62
5.3.270.0400.07014.63
5.3.260.0230.04314.58
5.3.250.0400.06714.78
5.3.240.0370.03714.52
5.3.230.0300.04314.65
5.3.220.0370.06314.64
5.3.210.0430.06714.56
5.3.200.0430.03714.56
5.3.190.0400.07014.49
5.3.180.0430.06314.79
5.3.170.0500.05014.47
5.3.160.0370.05714.47
5.3.150.0470.05714.64
5.3.140.0300.04314.53
5.3.130.0230.03714.45
5.3.120.0330.07714.57
5.3.110.0330.06014.71
5.3.100.0330.04014.02
5.3.90.0330.03014.14
5.3.80.0270.04014.00
5.3.70.0270.03713.93
5.3.60.0200.04013.94
5.3.50.0200.04014.05
5.3.40.0230.03714.00
5.3.30.0270.03313.99
5.3.20.0330.02313.67
5.3.10.0270.04013.66
5.3.00.0300.04013.65
5.2.170.0230.04011.08
5.2.160.0230.03311.11
5.2.150.0230.04011.21
5.2.140.0170.03011.20
5.2.130.0230.02711.12
5.2.120.0230.02311.04
5.2.110.0200.02711.04
5.2.100.0230.02711.27
5.2.90.0200.03311.07
5.2.80.0230.02311.11
5.2.70.0170.03011.11
5.2.60.0200.02710.97
5.2.50.0200.03011.10
5.2.40.0100.03310.90
5.2.30.0200.02311.03
5.2.20.0170.02710.88
5.2.10.0200.02310.84
5.2.00.0170.03310.68
5.1.60.0230.02310.16
5.1.50.0170.0239.93
5.1.40.0170.0239.91
5.1.30.0130.02710.26
5.1.20.0170.02310.34
5.1.10.0130.02710.06
5.1.00.0200.02310.06
5.0.50.0070.0278.57
5.0.40.0100.0178.30
5.0.30.0100.0308.24
5.0.20.0070.0278.34
5.0.10.0130.0138.25
5.0.00.0070.0308.14
4.4.90.0100.0137.45
4.4.80.0100.0177.45
4.4.70.0070.0177.45
4.4.60.0100.0137.45
4.4.50.0070.0177.45
4.4.40.0070.0277.45
4.4.30.0070.0177.45
4.4.20.0070.0207.45
4.4.10.0070.0177.45
4.4.00.0070.0237.45
4.3.110.0070.0177.45
4.3.100.0170.0107.45
4.3.90.0100.0177.45
4.3.80.0030.0277.45
4.3.70.0100.0107.45
4.3.60.0100.0107.45
4.3.50.0100.0137.45
4.3.40.0030.0277.45
4.3.30.0070.0237.45
4.3.20.0030.0207.45
4.3.10.0030.0207.45
4.3.00.0170.0277.45

preferences:
27.87 ms | 401 KiB | 5 Q