3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public $state = 1; } class B { public $a; public function __construct() { $this->a = $GLOBALS['a']; } } $GLOBALS['a'] = new A(); $b = new B(); echo $b->a->state . PHP_EOL; $GLOBALS['a']->state++; echo $b->a->state . PHP_EOL; $GLOBALS['a'] = new A(); echo $b->a->state . PHP_EOL;

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.4.20.0130.00317.93
8.4.10.0060.00319.73
8.3.150.0130.00619.11
8.3.140.0070.01116.67
8.3.130.0090.00018.36
8.3.120.0100.01020.59
8.3.110.0050.00520.94
8.3.100.0030.00616.53
8.3.90.0070.00726.77
8.3.80.0040.00417.97
8.3.70.0040.01418.55
8.3.60.0140.00316.63
8.3.50.0140.00721.97
8.3.40.0000.01518.54
8.3.30.0090.00618.44
8.3.20.0040.00420.30
8.3.10.0040.00423.48
8.3.00.0080.00022.32
8.2.260.0090.00018.68
8.2.250.0030.00618.50
8.2.240.0110.00017.17
8.2.230.0050.00322.58
8.2.220.0060.00324.06
8.2.210.0030.00526.77
8.2.200.0060.00316.50
8.2.190.0060.00918.43
8.2.180.0090.00616.38
8.2.170.0000.01422.96
8.2.160.0060.00919.29
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0060.00322.15
8.2.120.0000.00726.35
8.2.110.0040.00721.02
8.2.100.0060.00617.91
8.2.90.0030.00719.29
8.2.80.0040.00417.97
8.2.70.0030.00617.50
8.2.60.0040.00418.15
8.2.50.0000.00818.10
8.2.40.0040.00422.32
8.2.30.0000.00819.38
8.2.20.0050.00317.67
8.2.10.0040.00418.23
8.2.00.0040.00417.79
8.1.310.0060.00316.59
8.1.300.0040.00416.31
8.1.290.0060.00330.84
8.1.280.0110.01125.92
8.1.270.0000.00823.96
8.1.260.0070.00028.09
8.1.250.0100.00328.09
8.1.240.0080.00023.84
8.1.230.0110.00019.67
8.1.220.0000.00917.78
8.1.210.0080.00018.77
8.1.200.0030.00617.48
8.1.190.0060.00317.35
8.1.180.0060.00318.10
8.1.170.0090.00018.44
8.1.160.0030.00322.07
8.1.150.0000.00718.90
8.1.140.0000.00819.58
8.1.130.0050.00217.62
8.1.120.0080.00017.36
8.1.110.0030.00417.52
8.1.100.0050.00217.39
8.1.90.0040.00417.49
8.1.80.0040.00417.52
8.1.70.0050.00217.49
8.1.60.0060.00317.61
8.1.50.0040.00417.41
8.1.40.0050.00317.53
8.1.30.0040.00417.63
8.1.20.0000.00817.49
8.1.10.0030.00617.60
8.1.00.0030.00617.50
8.0.300.0030.00718.77
8.0.290.0040.00416.75
8.0.280.0000.00718.45
8.0.270.0000.00717.18
8.0.260.0000.00617.36
8.0.250.0030.00316.90
8.0.240.0000.00716.98
8.0.230.0000.00716.96
8.0.220.0000.00716.81
8.0.210.0070.00016.91
8.0.200.0000.00716.91
8.0.190.0050.00316.94
8.0.180.0000.00816.81
8.0.170.0020.00516.83
8.0.160.0000.00716.80
8.0.150.0000.00716.80
8.0.140.0000.00716.86
8.0.130.0030.00313.31
8.0.120.0040.00416.84
8.0.110.0040.00416.83
8.0.100.0000.00816.89
8.0.90.0080.00016.80
8.0.80.0040.01116.86
8.0.70.0000.00716.77
8.0.60.0070.00016.82
8.0.50.0040.00416.89
8.0.30.0090.01017.11
8.0.20.0110.00717.40
8.0.10.0000.00717.04
8.0.00.0130.00317.08
7.4.330.0000.00515.13
7.4.320.0000.00616.64
7.4.300.0030.00316.53
7.4.290.0030.00316.60
7.4.280.0000.00716.52
7.4.270.0060.00016.50
7.4.260.0070.00016.50
7.4.250.0030.00316.62
7.4.240.0050.00316.48
7.4.230.0030.00516.51
7.4.220.0100.00716.71
7.4.210.0110.00316.55
7.4.200.0060.00316.56
7.4.160.0080.00816.54
7.4.150.0150.00317.40
7.4.140.0120.00517.86
7.4.130.0030.01316.51
7.4.120.0100.00816.38
7.4.110.0030.01416.50
7.4.100.0090.00916.71
7.4.90.0130.00916.49
7.4.80.0090.00919.39
7.4.70.0060.00916.61
7.4.60.0120.00316.44
7.4.50.0050.00816.46
7.4.40.0060.01016.57
7.4.30.0060.01016.66
7.4.10.0040.01415.09
7.4.00.0060.00815.00
7.3.330.0050.00013.38
7.3.320.0000.00513.37
7.3.310.0020.00516.37
7.3.300.0030.00316.29
7.3.290.0070.00816.37
7.3.280.0080.01016.38
7.3.270.0100.00617.40
7.3.260.0090.00716.46
7.3.250.0040.01416.39
7.3.240.0070.01116.40
7.3.230.0080.01416.65
7.3.210.0060.01516.44
7.3.200.0150.00416.50
7.3.190.0100.01416.43
7.3.180.0060.01016.55
7.3.170.0090.00916.30
7.3.160.0160.00616.53
7.3.130.0140.00315.08
7.3.120.0110.00714.94
7.3.110.0060.01315.06
7.3.100.0090.00614.84
7.3.90.0000.01414.77
7.3.80.0000.01414.84
7.3.70.0050.00515.00
7.3.60.0040.00814.88
7.3.50.0000.00814.90
7.3.40.0030.01214.79
7.3.30.0060.00614.68
7.3.20.0030.01316.37
7.3.10.0090.00316.21
7.3.00.0060.00916.83
7.2.330.0060.01116.66
7.2.320.0060.01016.87
7.2.310.0090.01216.40
7.2.300.0060.01316.50
7.2.290.0130.00616.51
7.2.260.0070.01014.90
7.2.250.0030.01415.37
7.2.240.0060.00914.82
7.2.230.0070.00715.02
7.2.220.0000.01315.03
7.2.210.0030.01015.08
7.2.200.0060.00315.12
7.2.190.0100.00614.98
7.2.180.0060.00315.25
7.2.170.0040.01115.12
7.2.160.0080.00815.16
7.2.150.0030.01316.98
7.2.140.0030.01016.84
7.2.130.0040.00717.04
7.2.120.0030.01516.98
7.2.110.0050.00817.11
7.2.100.0040.01417.13
7.2.90.0060.00916.88
7.2.80.0070.00717.00
7.2.70.0060.01016.79
7.2.60.0100.00616.95
7.2.50.0040.01116.77
7.2.40.0070.00716.84
7.2.30.0060.00916.90
7.2.20.0040.01416.90
7.2.10.0060.00916.63
7.2.00.0040.01216.68
7.1.330.0140.00015.68
7.1.320.0030.01015.79
7.1.310.0100.00315.94
7.1.300.0040.00415.70
7.1.290.0060.00915.91
7.1.280.0090.00915.70
7.1.270.0000.01515.83
7.1.260.0100.00716.01
7.1.250.0060.00915.78
7.1.240.0140.00315.64
7.1.230.0100.00615.85
7.1.220.0000.01215.72
7.1.210.0030.01215.84
7.1.200.0070.00615.76
7.1.190.0080.00515.88
7.1.180.0030.00915.93
7.1.170.0000.01415.59
7.1.160.0060.00615.82
7.1.150.0110.00415.77
7.1.140.0000.00915.69
7.1.130.0030.01115.75
7.1.120.0030.01315.90
7.1.110.0070.00315.91
7.1.100.0040.00715.80
7.1.90.0030.00915.66
7.1.80.0040.01215.89
7.1.70.0020.00916.48
7.1.60.0110.00516.21
7.1.50.0060.00615.82
7.1.40.0040.00715.87
7.1.30.0060.00315.69
7.1.20.0060.00915.79
7.1.10.0120.00315.80
7.1.00.0070.03819.08
7.0.330.0060.00615.20
7.0.320.0110.00415.46
7.0.310.0100.00315.46
7.0.300.0000.01215.59
7.0.290.0050.01315.43
7.0.280.0110.00315.14
7.0.270.0000.01315.22
7.0.260.0030.00615.43
7.0.250.0000.01515.61
7.0.240.0040.00815.34
7.0.230.0040.00715.26
7.0.220.0000.01115.42
7.0.210.0030.01115.55
7.0.200.0130.00515.03
7.0.190.0060.00915.60
7.0.180.0030.01015.22
7.0.170.0070.00415.38
7.0.160.0060.00615.48
7.0.150.0030.01015.18
7.0.140.0030.01015.18
7.0.130.0040.01115.50
7.0.120.0030.01015.66
7.0.110.0070.04717.81
7.0.100.0100.04517.78
7.0.90.0180.02617.70
7.0.80.0040.04317.76
7.0.70.0120.04117.64
7.0.60.0090.03817.70
7.0.50.0130.02717.91
7.0.40.0120.03516.78
7.0.30.0090.03716.84
7.0.20.0130.03716.78
7.0.10.0030.04816.63
7.0.00.0080.03516.90
5.6.400.0070.00314.24
5.6.390.0090.00914.30
5.6.380.0060.00814.65
5.6.370.0110.00714.57
5.6.360.0080.00814.71
5.6.350.0070.01014.41
5.6.340.0000.01214.57
5.6.330.0070.00714.45
5.6.320.0060.00314.86
5.6.310.0040.01214.18
5.6.300.0060.00614.21
5.6.290.0000.00914.41
5.6.280.0030.00614.65
5.6.270.0070.00414.68
5.6.260.0030.01014.74
5.6.250.0050.04317.55
5.6.240.0070.04617.66
5.6.230.0130.03317.62
5.6.220.0080.04917.61
5.6.210.0050.04417.59
5.6.200.0120.03517.61
5.6.190.0060.02417.71
5.6.180.0030.03617.64
5.6.170.0050.04617.74
5.6.160.0050.03817.70
5.6.150.0080.04517.89
5.6.140.0080.03517.55
5.6.130.0030.04117.79
5.6.120.0130.03517.88
5.6.110.0150.03317.72
5.6.100.0060.04617.69
5.6.90.0020.04517.74
5.6.80.0030.04917.43
5.6.70.0080.04417.42
5.6.60.0080.03817.41
5.6.50.0090.04417.57
5.6.40.0100.03817.53
5.6.30.0090.04017.47
5.6.20.0080.04217.31
5.6.10.0070.03717.43
5.6.00.0110.03617.53

preferences:
71.97 ms | 403 KiB | 5 Q