3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyClass { public static $default_test = 'foo'; public $test; public function __construct() { $this->test = self::$default_test; } public function example() { return $this->test; } } MyClass::$default_test = 'bar'; $test = new MyClass(); echo $test->example(), PHP_EOL; MyClass::$default_test = 'hello'; $test = new MyClass(); echo $test->example();

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.5.30.0140.00421.17
8.5.20.0130.00519.15
8.5.10.0110.00716.57
8.5.00.0090.01219.79
8.4.180.0140.00819.41
8.4.170.0110.01222.07
8.4.160.0120.00922.09
8.4.150.0070.00516.87
8.4.140.0130.00817.52
8.4.130.0070.00717.76
8.4.120.0090.00920.40
8.4.110.0020.00719.03
8.4.100.0130.00917.69
8.4.90.0160.00517.77
8.4.80.0120.00617.82
8.4.70.0100.01117.93
8.4.60.0100.01019.13
8.4.50.0050.00318.64
8.4.40.0040.00419.80
8.4.30.0070.01518.59
8.4.20.0100.01020.25
8.4.10.0120.00417.58
8.3.300.0100.01218.22
8.3.290.0120.00920.73
8.3.280.0110.00918.13
8.3.270.0110.00816.59
8.3.260.0110.00816.58
8.3.250.0090.00917.24
8.3.240.0120.00716.47
8.3.230.0130.00616.42
8.3.220.0120.00716.50
8.3.210.0090.00616.42
8.3.200.0160.00516.65
8.3.190.0080.00919.16
8.3.180.0040.01516.96
8.3.170.0090.00919.09
8.3.160.0000.01418.50
8.3.150.0200.00016.91
8.3.140.0060.01217.09
8.3.130.0000.01518.20
8.3.120.0060.00320.91
8.3.110.0040.00418.30
8.3.100.0070.00424.06
8.3.90.0040.00426.77
8.3.80.0000.00816.50
8.3.70.0070.00716.58
8.3.60.0060.01218.40
8.3.50.0080.00917.30
8.3.40.0130.00618.82
8.3.30.0040.01118.76
8.3.20.0090.00020.85
8.3.10.0090.00923.59
8.3.00.0180.00023.57
8.2.300.0110.01022.20
8.2.290.0130.00618.80
8.2.280.0080.00718.77
8.2.270.0140.00316.73
8.2.260.0050.00218.92
8.2.250.0060.00316.93
8.2.240.0100.00017.07
8.2.230.0060.00320.94
8.2.220.0080.00037.54
8.2.210.0090.00326.77
8.2.200.0070.00416.50
8.2.190.0120.00616.58
8.2.180.0110.00725.92
8.2.170.0120.00319.00
8.2.160.0060.00922.96
8.2.150.0040.00425.66
8.2.140.0110.00024.66
8.2.130.0050.00226.16
8.2.120.0040.00421.00
8.2.110.0090.00020.94
8.2.100.0000.01117.72
8.2.90.0050.00218.34
8.2.80.0000.00817.97
8.2.70.0080.00017.80
8.2.60.0000.00718.03
8.2.50.0040.00418.10
8.2.40.0000.00819.23
8.2.30.0030.00319.26
8.2.20.0070.00018.04
8.2.10.0000.00719.10
8.2.00.0080.00019.48
8.1.340.0140.00823.57
8.1.330.0130.00716.17
8.1.320.0090.00817.88
8.1.310.0080.00016.85
8.1.300.0100.01018.36
8.1.290.0080.00430.84
8.1.280.0100.00725.92
8.1.270.0000.00824.66
8.1.260.0060.00326.35
8.1.250.0070.00028.09
8.1.240.0030.00620.77
8.1.230.0070.00320.97
8.1.220.0030.00517.74
8.1.210.0030.00718.77
8.1.200.0000.00817.36
8.1.190.0090.00017.13
8.1.180.0050.00318.10
8.1.170.0000.00818.40
8.1.160.0040.00418.70
8.1.150.0070.00018.83
8.1.140.0000.00722.14
8.1.130.0000.00720.12
8.1.120.0050.00217.41
8.1.110.0030.00517.38
8.1.100.0080.00017.45
8.1.90.0000.00717.32
8.1.80.0000.00817.30
8.1.70.0040.00417.36
8.1.60.0000.01117.59
8.1.50.0000.00817.54
8.1.40.0030.00617.54
8.1.30.0030.00617.59
8.1.20.0060.00317.68
8.1.10.0000.00717.44
8.1.00.0030.00517.37
8.0.300.0050.00319.86
8.0.290.0050.00316.75
8.0.280.0030.00318.45
8.0.270.0080.00017.14
8.0.260.0030.00318.32
8.0.250.0040.00316.90
8.0.240.0000.00816.97
8.0.230.0000.00716.76
8.0.220.0000.00716.88
8.0.210.0040.00416.79
8.0.200.0070.00016.89
8.0.190.0050.00216.77
8.0.180.0000.00816.86
8.0.170.0090.00016.77
8.0.160.0050.00216.84
8.0.150.0070.00316.73
8.0.140.0040.00416.78
8.0.130.0000.00513.30
8.0.120.0000.00816.71
8.0.110.0000.00916.74
8.0.100.0070.00016.65
8.0.90.0030.00316.82
8.0.80.0060.01016.82
8.0.70.0000.00716.85
8.0.60.0040.00416.71
8.0.50.0050.00216.86
8.0.30.0060.01117.22
8.0.20.0160.00617.40
8.0.10.0040.00416.82
8.0.00.0100.00716.62
7.4.330.0050.00016.69
7.4.320.0070.00016.55
7.4.300.0030.00316.43
7.4.290.0030.00316.50
7.4.280.0050.00516.40
7.4.270.0070.00016.58
7.4.260.0000.00816.63
7.4.250.0080.00016.54
7.4.240.0000.00716.65
7.4.230.0000.00716.61
7.4.220.0040.00416.58
7.4.210.0100.00516.55
7.4.200.0000.00716.44
7.4.160.0110.00616.49
7.4.140.0090.01117.86
7.4.130.0120.00916.73
7.4.120.0140.00616.49
7.4.110.0090.00916.66
7.4.100.0130.01016.46
7.4.90.0090.00916.51
7.4.80.0150.00919.39
7.4.70.0060.00916.46
7.4.60.0050.01116.54
7.4.50.0030.01016.52
7.4.40.0090.01416.47
7.4.10.0030.01414.77
7.4.00.0060.00915.10
7.3.330.0050.00013.38
7.3.320.0060.00013.30
7.3.310.0000.00716.19
7.3.300.0000.00716.30
7.3.290.0030.00316.32
7.3.280.0080.01016.25
7.3.260.0100.01016.41
7.3.240.0100.00916.32
7.3.230.0030.01316.31
7.3.210.0080.00816.29
7.3.200.0060.01516.26
7.3.190.0140.00916.63
7.3.180.0090.00616.46
7.3.170.0090.01316.55
7.3.160.0110.00716.29
7.3.130.0060.01014.64
7.3.120.0090.00614.72
7.3.110.0090.00914.88
7.3.100.0060.00614.75
7.3.90.0040.00815.08
7.3.80.0100.00014.85
7.3.70.0110.00314.91
7.3.60.0000.01014.48
7.3.50.0030.01014.50
7.3.40.0030.01214.75
7.3.30.0040.00414.77
7.3.20.0070.00416.49
7.3.10.0110.00816.56
7.3.00.0310.00715.94
7.2.330.0100.00716.77
7.2.320.0130.01016.46
7.2.310.0070.01016.70
7.2.300.0080.00716.74
7.2.290.0110.00516.91
7.2.260.0030.01614.61
7.2.250.0070.01015.00
7.2.240.0040.01115.03
7.2.230.0060.00615.09
7.2.220.0110.00414.98
7.2.210.0000.01414.86
7.2.200.0030.01015.01
7.2.190.0070.01014.79
7.2.180.0030.01015.04
7.2.170.0070.00714.97
7.2.160.0110.00414.98
7.2.150.0070.00316.93
7.2.140.0040.00716.95
7.2.130.0320.00916.21
7.2.120.0420.00816.18
7.2.110.0540.00516.26
7.2.100.0310.00616.26
7.2.90.0250.00816.28
7.2.80.0250.01216.18
7.2.70.0250.00816.22
7.2.60.0260.00516.25
7.2.50.0280.01116.19
7.2.40.0280.00316.27
7.2.30.0260.00716.22
7.2.20.0340.00816.32
7.2.10.0290.01016.28
7.2.00.0260.00716.27
7.1.330.0060.00915.84
7.1.320.0070.00415.61
7.1.310.0000.01415.40
7.1.300.0000.01115.61
7.1.290.0060.00615.70
7.1.280.0000.01415.72
7.1.270.0030.01015.65
7.1.260.0090.00315.67
7.1.250.0690.00614.99
7.1.240.0090.00615.74
7.1.230.0110.00415.83
7.1.220.0100.00315.44
7.1.210.0060.00315.78
7.1.200.0030.01015.76
7.1.190.0040.00815.67
7.1.180.0070.01015.44
7.1.170.0070.00715.61
7.1.160.0060.00915.71
7.1.150.0040.01115.89
7.1.140.0060.00615.75
7.1.130.0090.00615.55
7.1.120.0090.00315.51
7.1.110.0060.00315.65
7.1.100.0030.01015.48
7.1.90.0030.00815.55
7.1.80.0040.00715.39
7.1.70.0090.00615.42
7.1.60.0030.00715.83
7.1.50.0060.01015.49
7.1.40.0070.00715.79
7.1.30.0040.01015.70
7.1.20.0080.00415.50
7.1.10.0030.01015.74
7.1.00.0100.00015.71
7.0.330.0420.01214.41
7.0.320.0100.00315.53
7.0.310.0100.00715.38
7.0.300.0040.00815.31
7.0.290.0050.00515.12
7.0.280.0060.01215.38
7.0.270.0030.00915.38
7.0.260.0070.00315.48
7.0.250.0070.01015.57
7.0.240.0040.00415.60
7.0.230.0030.01315.50
7.0.220.0060.00615.57
7.0.210.0070.00415.41
7.0.200.0000.01515.15
7.0.190.0040.00415.08
7.0.180.0040.01115.45
7.0.170.0070.00715.48
7.0.160.0080.00015.14
7.0.150.0030.01215.46
7.0.140.0040.00415.43
7.0.130.0060.00615.16
7.0.120.0060.00915.30
7.0.110.0070.00715.42
7.0.100.0060.00315.14
7.0.90.0040.00715.48
7.0.80.0040.00415.41
7.0.70.0000.01715.42
7.0.60.0060.00615.44
7.0.50.0040.01115.25
7.0.40.0100.00313.47
7.0.30.0050.00313.43
7.0.20.0070.00713.52
7.0.10.0030.00913.39
7.0.00.0060.00613.43
5.6.400.0100.00314.46
5.6.390.0110.00314.39
5.6.380.0130.00014.33
5.6.370.0150.00314.28
5.6.360.0040.01114.57
5.6.350.0040.01114.31
5.6.340.0060.00914.37
5.6.330.0030.01314.29
5.6.320.0030.00914.40
5.6.310.0030.01414.55
5.6.300.0000.01414.39
5.6.290.0060.00314.38
5.6.280.0070.00714.21
5.6.270.0000.00814.46
5.6.260.0120.00314.36
5.6.250.0060.00314.17
5.6.240.0070.00714.37
5.6.230.0000.01314.34
5.6.220.0030.01314.36
5.6.210.0040.00814.58
5.6.200.0060.00614.30
5.6.190.0120.00414.50
5.6.180.0000.00814.25
5.6.170.0070.00314.29
5.6.160.0040.01114.70
5.6.150.0040.01114.53
5.6.140.0060.00614.34
5.6.130.0040.00714.44
5.6.120.0060.00914.44
5.6.110.0080.00014.32
5.6.100.0030.00614.34
5.6.90.0000.01314.31
5.6.80.0100.00314.21
5.6.70.0040.00814.38
5.6.60.0060.00614.38
5.6.50.0060.00914.13
5.6.40.0030.00914.45
5.6.30.0000.00914.32
5.6.20.0030.00714.18
5.6.10.0110.00314.55
5.6.00.0060.01014.34

preferences:
61.34 ms | 1927 KiB | 5 Q