3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Greeting { private static $message; public static function greet() { echo static::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.70.0170.00716.58
8.3.60.0080.00616.63
8.3.50.0190.00622.76
8.3.40.0120.00318.57
8.3.30.0070.00719.01
8.3.20.0040.00420.33
8.3.10.0080.00023.39
8.3.00.0040.00417.75
8.2.180.0040.01516.75
8.2.170.0120.00922.96
8.2.160.0160.00322.07
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0030.01026.16
8.2.120.0060.00320.86
8.2.110.0000.00922.22
8.2.100.0090.00317.91
8.2.90.0040.00419.09
8.2.80.0030.00517.97
8.2.70.0030.00517.50
8.2.60.0110.00517.80
8.2.50.0060.00318.07
8.2.40.0040.00718.07
8.2.30.0000.00718.13
8.2.20.0090.00017.66
8.2.10.0080.00018.07
8.2.00.0060.00317.63
8.1.280.0120.00925.92
8.1.270.0000.00823.92
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0000.00923.88
8.1.230.0080.00419.05
8.1.220.0040.00417.74
8.1.210.0030.00518.77
8.1.200.0100.00017.35
8.1.190.0030.00617.36
8.1.180.0030.00618.10
8.1.170.0000.00818.70
8.1.160.0040.00421.96
8.1.150.0070.00018.91
8.1.140.0040.00417.47
8.1.130.0070.00017.84
8.1.120.0030.00517.49
8.1.110.0040.00417.44
8.1.100.0070.00017.54
8.1.90.0000.00817.53
8.1.80.0030.00517.44
8.1.70.0050.00317.48
8.1.60.0000.00817.64
8.1.50.0080.00017.54
8.1.40.0040.00417.47
8.1.30.0080.00017.62
8.1.20.0040.00417.58
8.1.10.0000.00717.61
8.1.00.0030.00517.38
8.0.300.0000.00718.77
8.0.290.0000.00716.75
8.0.280.0000.00718.46
8.0.270.0000.00917.29
8.0.260.0000.00818.40
8.0.250.0030.00316.96
8.0.240.0070.00316.93
8.0.230.0000.00716.90
8.0.220.0030.00316.90
8.0.210.0050.00216.99
8.0.200.0000.00716.95
8.0.190.0040.00416.89
8.0.180.0070.00017.03
8.0.170.0030.00616.88
8.0.160.0070.00017.01
8.0.150.0030.00516.98
8.0.140.0060.00316.96
8.0.130.0060.00013.49
8.0.120.0030.00516.80
8.0.110.0000.00816.87
8.0.100.0040.00416.86
8.0.90.0000.00717.00
8.0.80.0120.00316.91
8.0.70.0040.00416.87
8.0.60.0030.00516.98
8.0.50.0000.00716.82
8.0.30.0120.00717.09
8.0.20.0150.01217.40
8.0.10.0070.00017.10
8.0.00.0110.00916.89
7.4.330.0050.00015.09
7.4.320.0040.00416.46
7.4.300.0040.00416.47
7.4.290.0030.00316.51
7.4.280.0090.00016.52
7.4.270.0080.00016.43
7.4.260.0030.00416.58
7.4.250.0000.00816.41
7.4.240.0030.00316.59
7.4.230.0030.00316.69
7.4.220.0030.01316.61
7.4.210.0090.00716.54
7.4.200.0030.00316.55
7.4.160.0080.00816.51
7.4.150.0110.01017.40
7.4.140.0100.01117.86
7.4.130.0080.00916.62
7.4.120.0070.01016.45
7.4.110.0030.01316.42
7.4.100.0100.00716.53
7.4.90.0040.01416.66
7.4.80.0140.00719.39
7.4.70.0070.01416.50
7.4.60.0120.00916.48
7.4.50.0000.00816.57
7.4.40.0110.00516.52
7.4.30.0030.01216.46
7.4.00.0040.01414.91
7.3.330.0050.00013.30
7.3.320.0000.00613.36
7.3.310.0070.00016.49
7.3.300.0030.00316.39
7.3.290.0060.00916.45
7.3.280.0110.00916.40
7.3.270.0070.01117.40
7.3.260.0040.01516.44
7.3.250.0130.00816.63
7.3.240.0100.01016.62
7.3.230.0070.01016.61
7.3.210.0100.00716.54
7.3.200.0070.01319.39
7.3.190.0170.00616.51
7.3.180.0120.00616.58
7.3.170.0100.01316.50
7.3.160.0080.00716.50
7.2.330.0090.00916.74
7.2.320.0100.00716.67
7.2.310.0130.00616.70
7.2.300.0070.01016.66
7.2.290.0170.00016.39
7.2.60.0120.00316.97
7.2.00.0060.00919.54
7.1.200.0090.00615.60
7.1.100.0040.01118.00
7.1.70.0140.00516.86
7.1.60.0100.01319.40
7.1.50.0060.01216.93
7.1.00.0070.07322.31
7.0.200.0080.00316.80
7.0.140.0100.06722.20
7.0.60.0100.06019.88
7.0.50.0070.06317.80
7.0.40.0030.06020.24
7.0.30.0170.05320.09
7.0.20.0330.07020.21
7.0.10.0070.04020.23
7.0.00.0200.07020.12
5.6.280.0000.07720.86
5.6.210.0070.07020.71
5.6.200.0070.03718.16
5.6.190.0030.06320.55
5.6.180.0330.07320.39
5.6.170.0230.07320.58
5.6.160.0100.04320.46
5.6.150.0100.06318.23
5.6.140.0030.05018.20
5.6.130.0100.04718.24
5.6.120.0000.05321.02
5.6.110.0070.08721.00
5.6.100.0070.03720.98
5.6.90.0030.04021.13
5.6.80.0200.07020.39
5.5.350.0270.08320.45
5.5.340.0070.07718.09
5.5.330.0070.04020.40
5.5.320.0370.07320.38
5.5.310.0270.03320.36
5.5.300.0030.04018.07
5.5.290.0000.04318.03
5.5.280.0100.06720.91
5.5.270.0070.03720.77
5.5.260.0000.04320.88
5.5.250.0130.05320.62
5.5.240.0170.07320.27
5.4.450.3230.03719.48
5.4.440.3170.04019.41
5.4.430.3170.03719.31
5.4.420.3200.04019.56
5.4.410.3070.04019.42
5.4.400.3300.03719.23
5.4.390.4100.02318.86
5.4.380.3400.04019.30
5.4.370.3430.03719.00
5.4.360.3330.04019.08
5.4.350.3030.03719.09
5.4.340.3030.03719.06
5.4.320.3330.04318.87
5.4.310.3370.03319.00
5.4.300.3070.03718.97
5.4.290.3130.03319.22
5.4.280.3600.04318.87
5.4.270.3400.03719.14
5.4.260.3230.03719.13
5.4.250.3130.03319.23
5.4.240.3270.04018.83
5.4.230.3300.03719.18
5.4.220.3500.03019.17
5.4.210.3330.03719.12
5.4.200.3400.03019.07
5.4.190.3330.03319.05
5.4.180.3170.03319.23
5.4.170.3900.03719.28
5.4.160.4770.04319.04
5.4.150.3100.04018.99
5.4.140.3330.03316.55
5.4.130.3030.03316.38
5.4.120.3830.04016.39
5.4.110.3930.04016.59
5.4.100.3700.02716.46
5.4.90.3870.04016.41
5.4.80.3800.03716.57
5.4.70.3300.04016.57
5.4.60.3300.03316.54
5.4.50.3070.03716.34
5.4.40.3070.03316.52
5.4.30.3030.03316.22
5.4.20.3230.03716.42
5.4.10.3070.03016.51
5.4.00.3330.03315.79
5.3.290.2770.03714.68
5.3.280.4730.04314.71
5.3.270.3830.04014.52
5.3.260.2370.03714.64
5.3.250.0100.05714.63
5.3.240.0000.08014.58
5.3.230.0070.06014.62
5.3.220.2870.04014.48
5.3.210.3970.03314.49
5.3.200.3630.03714.58
5.3.190.3870.03314.47
5.3.180.3900.04314.64
5.3.170.3430.03014.64
5.3.160.3970.03714.71
5.3.150.3430.03714.71
5.3.140.3170.03714.58
5.3.130.3400.03714.56
5.3.120.3000.04014.78
5.3.110.3330.04014.61
5.3.100.3370.04014.20
5.3.90.3000.04014.08
5.3.80.3100.03714.11
5.3.70.3270.03714.00
5.3.60.3370.03713.92
5.3.50.3170.03313.88
5.3.40.3370.03313.88
5.3.30.3970.04314.00
5.3.20.3130.03713.75
5.3.10.3300.03013.79
5.3.00.4000.03313.72
5.2.170.0730.05011.23
5.2.160.0030.06011.07
5.2.150.0070.06011.06
5.2.140.0070.06011.05
5.2.130.1830.03011.22
5.2.120.2830.02711.05
5.2.110.2830.03311.10
5.2.100.2870.02711.05
5.2.90.2730.02711.05
5.2.80.2870.03311.17
5.2.70.2730.03011.11
5.2.60.2570.02711.13
5.2.50.2770.03311.07
5.2.40.2300.03711.05
5.2.30.2430.02711.05
5.2.20.2370.03011.05
5.2.10.2100.03011.05
5.2.00.2200.03311.05
5.1.60.2330.02711.05
5.1.50.2370.02011.05
5.1.40.2370.02011.05
5.1.30.2070.03011.05
5.1.20.2130.01711.05
5.1.10.2100.02311.05
5.1.00.2200.02311.05
5.0.50.0900.01711.05
5.0.40.1270.02711.05
5.0.30.1300.03311.05
5.0.20.1030.02011.05
5.0.10.1200.02311.05
5.0.00.1100.03011.05
4.4.90.1000.01711.05
4.4.80.1230.02311.05
4.4.70.1270.01711.05
4.4.60.1100.01711.05
4.4.50.1030.01311.05
4.4.40.1270.03311.05
4.4.30.1030.01711.05
4.4.20.1270.02011.05
4.4.10.1000.01711.05
4.4.00.1100.02711.05
4.3.110.1300.02011.05
4.3.100.1170.01311.05
4.3.90.1230.01711.05
4.3.80.1430.02711.05
4.3.70.1330.01711.05
4.3.60.1400.01711.05
4.3.50.1200.02011.05
4.3.40.1170.02311.05
4.3.30.0700.02711.05
4.3.20.0600.01711.05
4.3.10.0700.02011.05
4.3.00.0630.02711.05

preferences:
43.45 ms | 401 KiB | 5 Q