3v4l.org

run code in 300+ PHP versions simultaneously
<?php final class Guard { private $x = 'test'; } $guard = new Guard(); $thief = function ($name) { return $this->$name; }; $hydrator = function ($name, $value) { $this->$name = $value; }; echo $thief->bindTo($guard, Guard::class)('x') . "\n"; $hydrator->bindTo($guard, Guard::class)('x', 'bla'); echo $thief->bindTo($guard, Guard::class)('x') . "\n";

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.00.0130.01319.91
8.4.150.0030.00014.05
8.4.140.0120.01119.14
8.4.130.0070.00217.95
8.4.120.0040.00520.70
8.4.110.0120.00722.40
8.4.100.0150.00617.67
8.4.90.0150.00622.36
8.4.80.0080.00919.49
8.4.70.0110.00617.42
8.4.60.0090.00118.46
8.4.50.0110.00917.66
8.4.40.0160.00617.80
8.4.30.0130.00720.61
8.4.20.0190.01119.52
8.4.10.0110.00619.46
8.3.280.0130.00718.49
8.3.270.0110.00816.60
8.3.260.0080.00116.82
8.3.250.0060.00218.83
8.3.240.0100.00916.52
8.3.230.0100.00616.38
8.3.220.0050.00517.40
8.3.210.0080.00416.49
8.3.200.0050.00316.60
8.3.190.0100.00518.91
8.3.180.0080.01116.69
8.3.170.0130.00716.41
8.3.160.0100.00717.20
8.3.150.0150.00917.56
8.3.140.0090.00418.42
8.3.130.0110.00216.39
8.3.120.0100.00517.68
8.3.110.0090.00418.56
8.3.100.0110.00517.99
8.3.90.0170.00616.54
8.3.80.0310.00316.33
8.3.70.0250.00916.17
8.3.60.0240.00916.31
8.3.50.0260.00516.30
8.3.40.0170.00517.31
8.3.30.0150.00617.21
8.3.20.0160.00517.32
8.3.10.0160.00317.91
8.3.00.0130.00417.96
8.2.290.0130.00620.60
8.2.280.0120.00718.39
8.2.270.0090.00517.15
8.2.260.0080.00517.41
8.2.250.0090.00316.55
8.2.240.0080.00517.75
8.2.230.0070.01019.64
8.2.220.0120.00420.97
8.2.210.0130.00516.22
8.2.200.0180.00216.34
8.2.190.0160.00516.48
8.2.180.0170.00216.42
8.2.170.0220.00017.44
8.2.160.0170.00317.62
8.2.150.0180.00517.38
8.2.140.0260.00517.38
8.2.130.0300.00617.32
8.2.120.0270.00717.58
8.2.110.0240.00617.38
8.2.100.0260.00417.19
8.2.90.0220.00517.39
8.2.80.0280.00217.94
8.2.70.0130.00617.42
8.2.60.0130.00817.32
8.2.50.0160.00317.44
8.2.40.0170.00417.41
8.2.30.0230.00717.26
8.2.20.0230.00917.23
8.2.10.0260.00517.34
8.2.00.0220.00617.29
8.1.330.0130.00718.50
8.1.320.0080.01316.10
8.1.310.0050.00816.06
8.1.300.0170.00216.87
8.1.290.0170.01016.13
8.1.280.0190.00816.00
8.1.270.0250.00617.01
8.1.260.0270.00717.29
8.1.250.0250.00517.19
8.1.240.0150.01116.98
8.1.230.0230.00617.03
8.1.220.0190.00717.10
8.1.210.0200.00416.99
8.1.200.0200.00617.05
8.1.190.0210.00416.98
8.1.180.0190.00616.88
8.1.170.0200.00617.17
8.1.160.0180.00917.08
8.1.150.0190.00417.27
8.1.140.0210.00217.17
8.1.130.0160.00917.22
8.1.120.0240.00717.02
8.1.110.0300.00617.08
8.1.100.0290.00717.20
8.1.90.0250.01117.05
8.1.80.0250.00817.29
8.1.70.0250.00917.20
8.1.60.0280.00717.33
8.1.50.0370.00717.13
8.1.40.0290.00917.37
8.1.30.0280.01217.34
8.1.20.0320.00717.34
8.1.10.0260.00617.41
8.1.00.0290.00417.00

preferences:
29.37 ms | 403 KiB | 5 Q