3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Author { public $name; private $id; public function __construct($id) { $this->id = $id; $this->name = null; } public function name() { return $this->name; } public function setName($name) { $this->name = $name; } public function id() { return $this->id; } public function __get($name) { echo 'we dont have all the pieces, look em up'; die; } } class Post { private $id; private $title; private $body; private $author; public function __construct($id, $title, $body, $author) { $this->id = $id; $this->title = $title; $this->body = $body; $this->author = $author; } public function id() { return $this->id; } public function title() { return $this->title; } public function setTitle($title) { $this->title = $title; } public function author() { return $this->author; } public function setAuthor(Author $author) { $this->author = $author; } } $post = new Post(111, 'A Song of Ice and Fire', 'My book is the shiz', new Author(222)); var_dump($post->author()->name);

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.60.0000.01416.63
8.3.50.0160.00522.95
8.3.40.0080.00818.70
8.3.30.0060.00919.04
8.3.20.0000.00720.37
8.3.10.0080.00021.90
8.3.00.0040.00417.77
8.2.180.0120.00916.88
8.2.170.0150.00022.96
8.2.160.0070.00720.36
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0000.00821.03
8.2.110.0100.00022.09
8.2.100.0110.00017.78
8.2.90.0070.00019.13
8.2.80.0040.00417.97
8.2.70.0030.00517.25
8.2.60.0040.00417.80
8.2.50.0000.00818.07
8.2.40.0000.00818.16
8.2.30.0040.00418.06
8.2.20.0020.00517.71
8.2.10.0000.00818.07
8.2.00.0000.00717.73
8.1.280.0100.00725.92
8.1.270.0040.00424.01
8.1.260.0000.00726.35
8.1.250.0070.00028.09
8.1.240.0090.00020.59
8.1.230.0060.00620.84
8.1.220.0030.00518.77
8.1.210.0040.00418.86
8.1.200.0000.00917.23
8.1.190.0040.00417.13
8.1.180.0030.00618.10
8.1.170.0040.00418.33
8.1.160.0040.00421.98
8.1.150.0050.00218.71
8.1.140.0080.00017.44
8.1.130.0030.00517.80
8.1.120.0030.00317.45
8.1.110.0050.00317.31
8.1.100.0000.00717.39
8.1.90.0000.00817.43
8.1.80.0000.00717.46
8.1.70.0000.00817.30
8.1.60.0000.00917.49
8.1.50.0030.00517.58
8.1.40.0050.00317.55
8.1.30.0000.00817.71
8.1.20.0060.00317.57
8.1.10.0040.00417.59
8.1.00.0090.00017.49
8.0.300.0090.00319.80
8.0.290.0040.00416.63
8.0.280.0000.00818.32
8.0.270.0030.00317.13
8.0.260.0030.00317.21
8.0.250.0000.00716.96
8.0.240.0070.00016.91
8.0.230.0030.00416.89
8.0.220.0030.00316.86
8.0.210.0000.00716.88
8.0.200.0000.00616.82
8.0.190.0070.00016.78
8.0.180.0030.00616.91
8.0.170.0040.00416.80
8.0.160.0000.00816.84
8.0.150.0040.00416.85
8.0.140.0100.00016.84
8.0.130.0030.00313.33
8.0.120.0040.00416.71
8.0.110.0070.00016.91
8.0.100.0000.00816.66
8.0.90.0050.00316.86
8.0.80.0120.00416.77
8.0.70.0020.00516.84
8.0.60.0020.00516.72
8.0.50.0040.00416.82
8.0.30.0120.00717.06
8.0.20.0150.01117.41
8.0.10.0030.00516.88
8.0.00.0080.01616.88
7.4.330.0070.00015.00
7.4.320.0030.00316.62
7.4.300.0040.00416.51
7.4.290.0000.00716.53
7.4.280.0000.00816.63
7.4.270.0040.00316.54
7.4.260.0070.00016.62
7.4.250.0030.00516.54
7.4.240.0000.00716.66
7.4.230.0000.00716.45
7.4.220.0000.01716.47
7.4.210.0070.01016.50
7.4.200.0000.00716.43
7.4.160.0050.01016.64
7.4.150.0040.01417.40
7.4.140.0070.01017.86
7.4.130.0090.00916.64
7.4.120.0110.00616.50
7.4.110.0130.00316.55
7.4.100.0120.00616.59
7.4.90.0090.00916.40
7.4.80.0160.00819.39
7.4.70.0110.01116.36
7.4.60.0090.00916.53
7.4.50.0030.00316.46
7.4.40.0090.01316.46
7.4.30.0130.00716.50
7.4.00.0030.01414.97
7.3.330.0000.00613.26
7.3.320.0050.00013.28
7.3.310.0000.00716.14
7.3.300.0050.00216.18
7.3.290.0000.01416.22
7.3.280.0080.01116.28
7.3.270.0090.00917.40
7.3.260.0060.01316.71
7.3.240.0210.00016.43
7.3.230.0080.00816.39
7.3.210.0120.00616.46
7.3.200.0170.00619.39
7.3.190.0070.01316.57
7.3.180.0060.00916.43
7.3.170.0100.00716.49
7.3.160.0090.01316.34
7.3.120.0080.00314.48
7.3.10.0050.00716.27
7.3.00.0070.00516.60
7.2.330.0070.01016.75
7.2.320.0120.00316.78
7.2.310.0130.00316.70
7.2.300.0090.00916.36
7.2.290.0080.01116.75
7.2.130.0050.00916.60
7.2.120.0060.00716.63
7.2.110.0030.00816.67
7.2.100.0060.00816.47
7.2.90.0050.00516.69
7.2.80.0090.00316.54
7.2.70.0040.00516.74
7.2.60.0070.00716.58
7.2.50.0020.01316.70
7.2.40.0060.00816.66
7.2.30.0090.00516.42
7.2.20.0080.00616.69
7.2.10.0070.00816.61
7.2.00.0070.00917.68
7.1.250.0050.00715.37
7.1.100.0000.01117.96
7.1.70.0110.00516.98
7.1.60.0090.01219.40
7.1.50.0070.01716.89
7.1.00.0000.09022.45
7.0.200.0030.00316.42
7.0.140.0070.07021.99
7.0.60.0100.03319.94
7.0.50.0130.08017.80
7.0.40.0070.08320.04
7.0.30.0200.06020.16
7.0.20.0270.06320.17
7.0.10.0100.07720.06
7.0.00.0100.07320.09
5.6.280.0130.06321.14
5.6.210.0130.08320.73
5.6.200.0000.07718.29
5.6.190.0070.05020.64
5.6.180.0370.07020.63
5.6.170.0430.05020.50
5.6.160.0100.06020.52
5.6.150.0030.05718.23
5.6.140.0000.04318.23
5.6.130.0000.09318.22
5.6.120.0030.05020.91
5.6.110.0070.08021.01
5.6.100.0100.08321.10
5.6.90.0070.09321.09
5.6.80.0100.06320.42
5.5.350.0030.03320.48
5.5.340.0200.07017.99
5.5.330.0170.03320.37
5.5.320.0330.03720.34
5.5.310.0100.05320.28
5.5.300.0100.07317.99
5.5.290.0100.08317.93
5.5.280.0100.04020.89
5.5.270.0200.04320.88
5.5.260.0100.07720.97
5.5.250.0030.06320.63
5.5.240.0130.03720.22
5.4.450.0170.04719.48
5.4.440.0500.04019.65
5.4.430.0170.05319.30
5.4.420.0230.04319.19
5.4.410.0300.03319.29
5.4.400.0100.05019.18
5.4.390.0300.04019.20
5.4.380.0170.05318.73
5.4.370.0130.06018.54
5.4.360.0070.06318.59
5.4.350.0170.05718.73
5.4.340.0230.04318.63
5.4.320.0030.04212.51
5.4.310.0080.03612.50
5.4.300.0030.04012.51
5.4.290.0020.04412.50
5.4.280.0070.03312.41
5.4.270.0040.03712.41
5.4.260.0040.03912.41
5.4.250.0040.03912.40
5.4.240.0080.03712.41
5.4.230.0070.03512.40
5.4.220.0090.03912.40
5.4.210.0060.03912.39
5.4.200.0040.04312.40
5.4.190.0080.03612.40
5.4.180.0070.03512.39
5.4.170.0040.03712.41
5.4.160.0040.03612.40
5.4.150.0030.03712.40
5.4.140.0080.03812.08
5.4.130.0080.03212.07
5.4.120.0030.04312.03
5.4.110.0070.03912.03
5.4.100.0070.03312.03
5.4.90.0070.04312.02
5.4.80.0050.03812.02
5.4.70.0050.04112.02
5.4.60.0060.03912.02
5.4.50.0090.03112.02
5.4.40.0040.04312.01
5.4.30.0050.04212.01
5.4.20.0050.03512.00
5.4.10.0090.03912.00
5.4.00.0060.03511.49
5.3.290.0060.04212.80
5.3.280.0030.04012.71
5.3.270.0050.03912.72
5.3.260.0040.04012.72
5.3.250.0080.03312.72
5.3.240.0090.03312.72
5.3.230.0050.03812.71
5.3.220.0060.03912.68
5.3.210.0080.03912.68
5.3.200.0090.03512.68
5.3.190.0060.03812.68
5.3.180.0070.03612.68
5.3.170.0090.03412.67
5.3.160.0050.03812.67
5.3.150.0020.04012.67
5.3.140.0060.04212.66
5.3.130.0070.03712.65
5.3.120.0100.03512.66
5.3.110.0060.04612.66
5.3.100.0070.03612.14
5.3.90.0040.04112.12
5.3.80.0080.03612.11
5.3.70.0080.03512.11
5.3.60.0100.03412.09
5.3.50.0050.04012.04
5.3.40.0070.03812.04
5.3.30.0050.03611.99
5.3.20.0070.03411.78
5.3.10.0060.03511.75
5.3.00.0070.03411.73
5.2.170.0060.0289.24
5.2.160.0050.0289.24
5.2.150.0040.0369.24
5.2.140.0050.0309.23
5.2.130.0030.0359.20
5.2.120.0040.0379.20
5.2.110.0050.0339.21
5.2.100.0040.0289.20
5.2.90.0030.0309.20
5.2.80.0060.0309.19
5.2.70.0040.0319.20
5.2.60.0040.0379.15
5.2.50.0030.0309.12
5.2.40.0060.0369.09
5.2.30.0060.0329.07
5.2.20.0060.0359.05
5.2.10.0050.0288.95
5.2.00.0040.0308.82
5.1.60.0040.0238.11
5.1.50.0040.0288.11
5.1.40.0060.0298.09
5.1.30.0040.0258.44
5.1.20.0010.0298.46
5.1.10.0040.0268.18
5.1.00.0040.0258.18
5.0.50.0020.0236.66
5.0.40.0040.0186.52
5.0.30.0010.0356.33
5.0.20.0050.0266.30
5.0.10.0010.0246.28
5.0.00.0050.0296.27
4.4.90.0040.0184.78
4.4.80.0010.0164.75
4.4.70.0030.0144.76
4.4.60.0030.0194.76
4.4.50.0030.0194.77
4.4.40.0030.0354.71
4.4.30.0030.0154.76
4.4.20.0010.0254.84
4.4.10.0020.0164.85
4.4.00.0020.0244.76
4.3.110.0040.0204.67
4.3.100.0030.0184.67
4.3.90.0020.0184.64
4.3.80.0010.0254.58
4.3.70.0010.0154.63
4.3.60.0010.0164.63
4.3.50.0030.0214.63
4.3.40.0010.0294.54
4.3.30.0010.0223.30
4.3.20.0030.0183.28
4.3.10.0020.0153.24
4.3.00.0070.01715.17

preferences:
35.93 ms | 401 KiB | 5 Q