3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Father { private $son; private $foo = ''; function getFoo() { return $this->foo; } } class Son { private $father; public function __construct(Father $dad) { $this->father = $dad; } function setFoo($value) { $this->dad->setFoo($value); } } $father = new Father(); $son = new Son($father); $son->setFoo('bar'); echo $father->getFoo(); //I want it to now be 'bar'

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.0160.00316.75
8.3.60.0190.00318.43
8.3.50.0060.00918.17
8.3.40.0110.00718.99
8.3.30.0110.00418.75
8.3.20.0080.00019.14
8.3.10.0080.00320.86
8.3.00.0040.00423.39
8.2.190.0110.00716.58
8.2.180.0040.01118.29
8.2.170.0120.00622.96
8.2.160.0030.01022.03
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0030.00917.96
8.2.120.0040.00426.35
8.2.110.0060.00320.98
8.2.100.0090.00318.09
8.2.90.0000.00819.23
8.2.80.0080.00017.97
8.2.70.0080.00017.90
8.2.60.0090.00017.91
8.2.50.0060.00518.10
8.2.40.0040.00419.32
8.2.30.0040.00419.30
8.2.20.0020.00517.94
8.2.10.0040.00419.78
8.2.00.0000.00719.43
8.1.280.0120.00925.92
8.1.270.0080.00022.02
8.1.260.0080.00026.35
8.1.250.0000.00828.09
8.1.240.0150.00420.87
8.1.230.0070.00317.64
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0050.00317.35
8.1.190.0000.00917.10
8.1.180.0040.00418.10
8.1.170.0080.00018.65
8.1.160.0040.00418.70
8.1.150.0040.00418.82
8.1.140.0040.00417.59
8.1.130.0000.00717.45
8.1.120.0070.00317.26
8.1.110.0050.00317.34
8.1.100.0000.00817.32
8.1.90.0040.00417.24
8.1.80.0040.00417.31
8.1.70.0000.00817.31
8.1.60.0040.00417.58
8.1.50.0040.00417.52
8.1.40.0040.00417.48
8.1.30.0050.00317.60
8.1.20.0030.00517.69
8.1.10.0000.00917.58
8.1.00.0040.00417.51
8.0.300.0030.00518.77
8.0.290.0040.00416.63
8.0.280.0070.00018.25
8.0.270.0030.00617.21
8.0.260.0030.00316.76
8.0.250.0070.00317.00
8.0.240.0000.00717.02
8.0.230.0080.00016.98
8.0.220.0030.00616.89
8.0.210.0030.00316.80
8.0.200.0050.00316.94
8.0.190.0030.00616.88
8.0.180.0030.00616.76
8.0.170.0000.00816.88
8.0.160.0040.00416.98
8.0.150.0040.00416.79
8.0.140.0000.00716.86
8.0.130.0000.00513.39
8.0.120.0030.00516.86
8.0.110.0000.00716.89
8.0.100.0030.00516.81
8.0.90.0070.00016.67
8.0.80.0050.01016.85
8.0.70.0000.00716.70
8.0.60.0050.00316.85
8.0.50.0000.00716.84
8.0.30.0100.00917.07
8.0.20.0120.00817.40
8.0.10.0000.00717.00
8.0.00.0100.00916.93
7.4.330.0000.00515.55
7.4.320.0060.00016.43
7.4.300.0030.00316.55
7.4.290.0000.00716.41
7.4.280.0060.00316.47
7.4.270.0040.00416.51
7.4.260.0000.00716.50
7.4.250.0000.00716.56
7.4.240.0050.00316.41
7.4.230.0040.00416.71
7.4.220.0000.00716.50
7.4.210.0090.00916.49
7.4.200.0000.00716.38
7.4.160.0100.00716.46
7.4.140.0100.00917.86
7.4.130.0060.01116.59
7.4.120.0110.00916.49
7.4.110.0090.00916.30
7.4.100.0030.02116.32
7.4.90.0130.00416.57
7.4.80.0130.01019.39
7.4.70.0110.00616.48
7.4.60.0040.01516.68
7.4.50.0070.00716.32
7.4.40.0090.01216.63
7.4.00.0070.01014.83
7.3.330.0050.00013.23
7.3.320.0030.00313.32
7.3.310.0040.00416.33
7.3.300.0070.00016.38
7.3.290.0030.00316.34
7.3.280.0120.00716.33
7.3.260.0110.00716.40
7.3.240.0100.00616.43
7.3.230.0170.00016.38
7.3.210.0180.00016.28
7.3.200.0130.00316.54
7.3.190.0060.01216.41
7.3.180.0130.00316.29
7.3.170.0000.01616.57
7.3.160.0090.00716.32
7.3.120.0070.01014.62
7.3.110.0070.01114.59
7.3.100.0130.00614.77
7.3.90.0040.01114.79
7.3.80.0110.00414.70
7.3.70.0060.00314.70
7.3.60.0080.00814.94
7.3.50.0090.00614.69
7.3.40.0080.00814.91
7.3.30.0090.00014.97
7.3.20.0030.01416.58
7.3.10.0070.00716.62
7.3.00.0070.00716.77
7.2.330.0120.00616.54
7.2.320.0160.01316.69
7.2.310.0120.01216.46
7.2.300.0190.00016.71
7.2.290.0060.01316.52
7.2.250.0070.01315.03
7.2.240.0060.01315.31
7.2.230.0060.01014.86
7.2.220.0070.01014.94
7.2.210.0000.01414.70
7.2.200.0060.00315.02
7.2.190.0100.00314.98
7.2.180.0060.01215.07
7.2.170.0000.01115.08
7.2.160.0030.01415.00
7.2.150.0110.00716.80
7.2.140.0110.01117.07
7.2.130.0080.00416.52
7.2.120.0030.01016.92
7.2.110.0170.00017.04
7.2.100.0090.00916.81
7.2.90.0070.00716.98
7.2.80.0030.00916.99
7.2.70.0120.00016.97
7.2.60.0080.01215.96
7.2.50.0130.00815.83
7.2.40.0190.00516.06
7.2.30.0170.01015.89
7.2.20.0170.01016.05
7.2.10.0130.00915.83
7.2.00.0220.00515.97
7.1.330.0100.00715.74
7.1.320.0080.00315.77
7.1.310.0030.01015.77
7.1.300.0000.00915.81
7.1.290.0090.00315.96
7.1.280.0030.00815.75
7.1.270.0000.01415.75
7.1.260.0060.00615.77
7.1.250.0000.01015.70
7.1.240.0060.01316.02
7.1.230.0070.01115.79
7.1.220.0060.01215.82
7.1.210.0060.00615.42
7.1.200.0060.00615.82
7.1.190.0000.01215.42
7.1.180.0090.00315.78
7.1.170.0180.00814.73
7.1.160.0150.00714.78
7.1.150.0180.00614.70
7.1.140.0140.01114.81
7.1.130.0170.00614.79
7.1.120.0140.00914.73
7.1.110.0210.00514.63
7.1.100.0180.00614.87
7.1.90.0150.00514.65
7.1.80.0120.00914.62
7.1.70.0590.00614.82
7.1.60.0230.00923.80
7.1.50.0310.00623.78
7.1.40.0380.00523.69
7.1.30.0330.00523.67
7.1.20.0270.00623.72
7.1.10.0230.00514.58
7.1.00.0120.01114.65
7.0.330.0070.01015.28
7.0.320.0130.00315.63
7.0.310.0090.00315.49
7.0.300.0060.00615.41
7.0.290.0030.01015.33
7.0.280.0080.00015.14
7.0.270.0000.01015.26
7.0.260.0030.00915.07
7.0.250.0090.00015.44
7.0.240.0100.00015.41
7.0.230.0090.00015.38
7.0.220.0070.00715.48
7.0.210.0040.01115.20
7.0.200.0030.01215.30
7.0.190.0030.00915.22
7.0.180.0050.00515.29
7.0.170.0090.00315.19
7.0.160.0000.01415.43
7.0.150.0000.00815.42
7.0.140.0040.01115.37
7.0.130.0070.00415.20
7.0.120.0000.00815.23
7.0.110.0030.00815.43
7.0.100.0060.00915.45
7.0.90.0060.00315.55
7.0.80.0000.01315.14
7.0.70.0030.00715.49
7.0.60.0030.01015.34
7.0.50.0060.00615.29
7.0.40.0000.01313.46
7.0.30.0030.00713.14
7.0.20.0060.00913.23
7.0.10.0000.01513.54
7.0.00.0030.01313.61
5.6.400.0100.00614.61
5.6.390.0040.01114.35
5.6.380.0070.00714.42
5.6.370.0130.00314.67
5.6.360.0030.01014.62
5.6.350.0090.00314.17
5.6.340.0060.00614.18
5.6.330.0000.01114.16
5.6.320.0040.01114.57
5.6.310.0060.01314.46
5.6.300.0120.00014.30
5.6.290.0060.00314.59
5.6.280.0110.00014.18
5.6.270.0040.00814.14
5.6.260.0080.00814.67
5.6.250.0100.00314.50
5.6.240.0000.01114.70
5.6.230.0070.00714.38
5.6.220.0070.00714.23
5.6.210.0030.00614.66
5.6.200.0040.00714.64
5.6.190.0030.01314.55
5.6.180.0060.00614.21
5.6.170.0070.00714.08
5.6.160.0080.00414.04
5.6.150.0040.01114.23
5.6.140.0070.00314.51
5.6.130.0030.00914.31
5.6.120.0110.00414.37
5.6.110.0060.00614.04
5.6.100.0060.00914.08
5.6.90.0130.00014.45
5.6.80.0090.00014.29
5.6.70.0030.01214.00
5.6.60.0090.00614.09
5.6.50.0110.00414.31
5.6.40.0100.00314.30
5.6.30.0060.00714.18
5.6.20.0000.00814.13
5.6.10.0030.00714.29
5.6.00.0100.00314.37

preferences:
49.79 ms | 401 KiB | 5 Q