3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { private $key; public function __construct($value) { $this->key = $value; } public function printKey(Foo $b) { print $b->key; } } $x = new Foo(‘AAA’); $x->printKey(new Foo(‘BBB’)); <= что будет на экране? почему?

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)
5.4.280.0110.05712.40
5.4.270.0080.06112.40
5.4.260.0100.04712.41
5.4.250.0100.05312.40
5.4.240.0130.05412.40
5.4.230.0090.05312.39
5.4.220.0100.05012.40
5.4.210.0090.05012.40
5.4.200.0090.04612.40
5.4.190.0120.06112.39
5.4.180.0100.06012.39
5.4.170.0090.05612.40
5.4.160.0120.05112.40
5.4.150.0110.05212.39
5.4.140.0140.04712.08
5.4.130.0100.05212.06
5.4.120.0190.07512.03
5.4.110.0110.07012.02
5.4.100.0090.04912.03
5.4.90.0090.05312.03
5.4.80.0110.05512.02
5.4.70.0150.05312.02
5.4.60.0090.04712.02
5.4.50.0070.04712.02
5.4.40.0100.04812.01
5.4.30.0100.04012.01
5.4.20.0100.04312.00
5.4.10.0080.04012.00
5.4.00.0060.04811.50
5.3.280.0090.04712.71
5.3.270.0100.05012.72
5.3.260.0090.04712.72
5.3.250.0110.04912.72
5.3.240.0110.05912.72
5.3.230.0110.04712.71
5.3.220.0090.04712.68
5.3.210.0110.04512.68
5.3.200.0110.04912.68
5.3.190.0090.04912.68
5.3.180.0100.05212.67
5.3.170.0100.05012.67
5.3.160.0100.04812.67
5.3.150.0090.04812.67
5.3.140.0110.05412.66
5.3.130.0120.05612.66
5.3.120.0090.05012.66
5.3.110.0120.05712.66
5.3.100.0090.04612.12
5.3.90.0100.05012.10
5.3.80.0100.05112.09
5.3.70.0150.04812.09
5.3.60.0100.04612.08
5.3.50.0100.04412.02
5.3.40.0090.04612.02
5.3.30.0100.05011.98
5.3.20.0100.05711.76
5.3.10.0120.04811.73
5.3.00.0090.04711.72

preferences:
146.16 ms | 939 KiB | 8 Q