3v4l.org

run code in 300+ PHP versions simultaneously
<?php function assign_foo($instance) { $instance->foo = 2; } final class Content { protected $data; public function __get(string $name) { return $this->data[$name]; } public function __set(string $name, mixed $value): void { if ($value === 1) { assign_foo($this); } else { $this->data[$name] = $value; } } } set_error_handler(function () { echo (new Exception)->getTraceAsString(); }); $content = new Content(); $content->foo = 1;

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.10.0100.00619.28
8.3.140.0100.00716.63
8.3.130.0050.00316.86
8.3.120.0060.00319.11
8.3.110.0060.00320.94
8.3.100.0070.00318.34
8.3.90.0000.00826.77
8.3.80.0060.00317.97
8.3.70.0080.00818.28
8.3.60.0120.00918.56
8.3.50.0070.01116.48
8.3.40.0100.00322.15
8.3.30.0110.00720.39
8.3.20.0040.00424.18
8.3.10.0080.00024.66
8.3.00.0000.00726.16
8.2.260.0000.01916.82
8.2.250.0040.00418.30
8.2.240.0060.01316.97
8.2.230.0090.00022.58
8.2.220.0100.00024.06
8.2.210.0080.00026.77
8.2.200.0060.00318.41
8.2.190.0170.00318.11
8.2.180.0110.00616.75
8.2.170.0070.01418.89
8.2.160.0150.00422.96
8.2.150.0120.00625.66
8.2.140.0050.00324.66
8.2.130.0000.00826.16
8.2.120.0040.00419.48
8.2.110.0140.00722.21
8.2.100.0070.01320.91
8.2.90.0180.00618.81
8.2.80.0100.00618.66
8.2.70.0170.00918.64
8.2.60.0070.00619.61
8.2.50.0110.00719.80
8.2.40.0090.00418.84
8.2.30.0100.00318.68
8.2.20.0070.00919.97
8.2.10.0160.00218.80
8.2.00.0140.00119.00
8.1.310.0080.00018.70
8.1.300.0090.00918.24
8.1.290.0110.00030.84
8.1.280.0070.01425.92
8.1.270.0050.00323.99
8.1.260.0040.00426.35
8.1.250.0060.00328.09
8.1.240.0130.00518.61
8.1.230.0180.00218.57
8.1.220.0120.00518.62
8.1.210.0120.00119.93
8.1.200.0100.00318.52
8.1.190.0090.00518.40
8.1.180.0150.00018.44
8.1.170.0090.00418.41
8.1.160.0120.00018.79
8.1.150.0040.00820.48
8.1.140.0080.00518.52
8.1.130.0080.00718.53
8.1.120.0080.00418.54
8.1.110.0130.00419.70
8.1.100.0150.00518.44
8.1.90.0090.00518.45
8.1.80.0070.00618.50
8.1.70.0090.00318.67
8.1.60.0110.00618.64
8.1.50.0080.00818.63
8.1.40.0080.00618.73
8.1.30.0080.00418.82
8.1.20.0090.00618.59
8.1.10.0110.00218.75
8.1.00.0050.00818.55
8.0.300.0130.00217.69
8.0.290.0120.00317.76
8.0.280.0070.00717.75
8.0.270.0120.00317.71
8.0.260.0100.00118.30
8.0.250.0140.00217.81
8.0.240.0110.00317.86
8.0.230.0080.00318.13
8.0.220.0090.00617.68
8.0.210.0070.00717.74
8.0.200.0150.00617.85
8.0.190.0140.00318.28
8.0.180.0190.00517.95
8.0.170.0170.00417.81
8.0.160.0160.00617.89
8.0.150.0230.00217.65
8.0.140.0200.00417.69
8.0.130.0180.00218.24
8.0.120.0230.00217.87
8.0.110.0200.00317.96
8.0.100.0200.00317.85
8.0.90.0170.00417.73
8.0.80.0200.00517.84
8.0.70.0110.00917.74
8.0.60.0140.00318.24
8.0.50.0120.00617.63
8.0.30.0130.00318.38
8.0.20.0170.00817.96
8.0.10.0170.00817.98

preferences:
22.53 ms | 403 KiB | 5 Q