3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Author { private $name; private $id; public function __construct($id, $name = null) { $this->id = $id; $this->name = $name; } public function name() { return $this->name; } public function setName($name) { $this->name = $name; } public function id() { return $this->id; } public function __call($name, $value) { echo 'we dont have all the pieces, look em up'; } } 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, 'George RR Martin')); echo $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.0130.00917.00
8.3.50.0120.00323.04
8.3.40.0040.01118.96
8.3.30.0040.01118.90
8.3.20.0070.00020.11
8.3.10.0040.00421.90
8.3.00.0080.00019.79
8.2.180.0150.00416.63
8.2.170.0090.00622.96
8.2.160.0100.00720.34
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0000.00721.09
8.2.110.0080.00022.16
8.2.100.0000.01219.76
8.2.90.0060.00319.22
8.2.80.0030.00617.97
8.2.70.0000.00917.50
8.2.60.0060.00317.80
8.2.50.0000.00818.07
8.2.40.0040.00418.22
8.2.30.0040.00418.02
8.2.20.0000.00817.81
8.2.10.0080.00018.03
8.2.00.0000.00817.77
8.1.280.0120.00625.92
8.1.270.0060.00323.88
8.1.260.0080.00026.35
8.1.250.0040.00828.09
8.1.240.0100.00023.96
8.1.230.0040.00719.01
8.1.220.0080.00017.74
8.1.210.0000.00818.77
8.1.200.0060.00317.35
8.1.190.0000.00817.22
8.1.180.0080.00018.10
8.1.170.0000.00918.52
8.1.160.0000.00721.91
8.1.150.0030.00418.75
8.1.140.0070.00017.45
8.1.130.0070.00017.86
8.1.120.0000.00817.28
8.1.110.0030.00617.39
8.1.100.0000.00717.41
8.1.90.0000.00817.29
8.1.80.0000.00717.41
8.1.70.0000.00717.30
8.1.60.0050.00317.64
8.1.50.0080.00017.59
8.1.40.0040.00417.43
8.1.30.0000.00817.68
8.1.20.0000.00717.74
8.1.10.0000.00817.65
8.1.00.0000.00717.50
8.0.300.0040.00418.77
8.0.290.0000.00716.63
8.0.280.0030.00318.28
8.0.270.0030.00317.15
8.0.260.0000.00618.31
8.0.250.0030.00316.88
8.0.240.0080.00017.04
8.0.230.0080.00017.00
8.0.220.0000.00716.86
8.0.210.0070.00016.90
8.0.200.0000.00616.94
8.0.190.0040.00416.93
8.0.180.0000.00816.87
8.0.170.0050.00316.99
8.0.160.0050.00216.86
8.0.150.0070.00016.80
8.0.140.0070.00316.77
8.0.130.0030.00313.32
8.0.120.0040.00416.90
8.0.110.0000.00816.98
8.0.100.0000.00716.78
8.0.90.0000.00716.74
8.0.80.0040.01216.91
8.0.70.0070.00016.74
8.0.60.0040.00416.77
8.0.50.0070.00016.71
8.0.30.0070.01217.23
8.0.20.0170.00617.44
8.0.10.0000.00716.89
8.0.00.0080.01216.78
7.4.330.0000.00615.00
7.4.320.0000.00716.58
7.4.300.0030.00316.53
7.4.290.0000.00716.67
7.4.280.0070.00016.68
7.4.270.0040.00416.57
7.4.260.0030.00316.64
7.4.250.0040.00416.39
7.4.240.0040.00316.49
7.4.230.0070.00016.62
7.4.220.0100.01016.57
7.4.210.0070.01116.60
7.4.200.0080.00016.61
7.4.160.0120.00316.52
7.4.150.0060.01217.40
7.4.140.0100.01017.86
7.4.130.0030.01316.63
7.4.120.0090.00916.53
7.4.110.0130.00916.54
7.4.100.0190.00616.65
7.4.90.0140.00316.63
7.4.80.0090.00919.39
7.4.70.0100.01116.41
7.4.60.0080.00816.40
7.4.50.0040.00416.41
7.4.40.0090.00616.80
7.4.30.0030.01316.56
7.4.00.0110.00414.97
7.3.330.0000.00713.34
7.3.320.0000.00513.37
7.3.310.0000.00716.28
7.3.300.0040.00416.32
7.3.290.0090.00616.39
7.3.280.0050.01216.36
7.3.270.0070.01017.40
7.3.260.0140.00416.42
7.3.250.0150.00716.38
7.3.240.0100.00716.31
7.3.230.0100.00716.56
7.3.210.0070.01016.46
7.3.200.0090.00819.39
7.3.190.0140.00716.49
7.3.180.0040.01116.49
7.3.170.0100.01016.48
7.3.160.0030.01316.50
7.3.120.0000.01114.87
7.2.330.0100.00716.80
7.2.320.0090.00816.73
7.2.310.0060.01216.71
7.2.300.0100.00616.67
7.2.290.0060.01216.72
7.2.60.0070.00717.03
7.2.00.0070.00719.28
7.1.200.0270.00415.23
7.1.100.0090.01318.19
7.1.70.0000.01516.73
7.1.60.0090.00619.40
7.1.50.0060.01816.98
7.1.00.0070.07022.37
7.0.200.0000.00716.68
7.0.140.0070.07322.15
7.0.60.0030.09020.02
7.0.50.0070.04717.96
7.0.40.0030.08320.11
7.0.30.0270.08320.23
7.0.20.0400.06320.30
7.0.10.0030.05020.06
7.0.00.0100.03720.23
5.6.280.0100.07020.92
5.6.210.0070.05720.54
5.6.200.0030.04018.15
5.6.190.0070.05020.48
5.6.180.0430.04320.44
5.6.170.0170.04020.39
5.6.160.0000.09020.55
5.6.150.0030.05318.13
5.6.140.0100.04018.24
5.6.130.0070.08018.19
5.6.120.0130.05021.02
5.6.110.0100.08320.97
5.6.100.0270.07320.99
5.6.90.0100.05721.17
5.6.80.0070.08020.50
5.5.350.0330.07320.48
5.5.340.0070.08017.96
5.5.330.0070.05020.57
5.5.320.0070.06720.22
5.5.310.0270.07720.32
5.5.300.0030.08317.93
5.5.290.0000.04317.97
5.5.280.0130.07720.81
5.5.270.0000.07320.87
5.5.260.0170.08020.89
5.5.250.0000.04720.59
5.5.240.0100.07720.17
5.4.450.0200.07319.47
5.4.440.0970.05719.47
5.4.430.0870.05719.46
5.4.420.0830.05719.20
5.4.410.0930.05719.34
5.4.400.0770.05019.10
5.4.390.0830.06018.84
5.4.380.0100.06018.77
5.4.370.0230.05018.74
5.4.360.0170.05018.57
5.4.350.0270.04718.76
5.4.340.0200.05318.51
5.4.320.0080.03512.52
5.4.310.0080.03512.52
5.4.300.0030.03912.52
5.4.290.0050.03812.51
5.4.280.0090.03812.41
5.4.270.0070.03412.41
5.4.260.0070.04312.41
5.4.250.0080.03512.41
5.4.240.0060.04012.41
5.4.230.0050.03812.40
5.4.220.0070.04012.40
5.4.210.0040.03712.40
5.4.200.0060.04312.40
5.4.190.0050.03612.40
5.4.180.0060.03712.40
5.4.170.0050.04312.41
5.4.160.0060.03412.41
5.4.150.0030.03912.40
5.4.140.0070.03812.08
5.4.130.0070.04212.07
5.4.120.0060.03412.04
5.4.110.0100.03312.03
5.4.100.0070.03712.03
5.4.90.0040.03912.03
5.4.80.0070.03912.03
5.4.70.0060.03412.02
5.4.60.0060.04012.03
5.4.50.0100.03612.02
5.4.40.0070.03412.01
5.4.30.0060.03612.01
5.4.20.0060.03412.00
5.4.10.0070.03312.01
5.4.00.0060.03511.50
5.3.290.0090.05212.80
5.3.280.0040.03812.71
5.3.270.0040.04012.73
5.3.260.0070.04412.72
5.3.250.0050.03812.72
5.3.240.0070.03612.72
5.3.230.0080.03512.71
5.3.220.0090.03612.68
5.3.210.0070.04412.68
5.3.200.0070.03612.68
5.3.190.0070.04012.68
5.3.180.0060.03712.68
5.3.170.0050.03712.67
5.3.160.0100.03312.67
5.3.150.0090.03612.67
5.3.140.0080.04112.66
5.3.130.0070.03912.66
5.3.120.0100.03912.66
5.3.110.0070.03812.66
5.3.100.0050.03912.14
5.3.90.0060.03812.12
5.3.80.0040.03812.12
5.3.70.0010.04112.12
5.3.60.0050.03712.10
5.3.50.0040.03812.05
5.3.40.0070.03512.05
5.3.30.0050.03712.00
5.3.20.0070.03611.78
5.3.10.0080.03311.75
5.3.00.0050.04511.74
5.2.170.0070.0299.24
5.2.160.0050.0289.24
5.2.150.0030.0339.25
5.2.140.0030.0319.24
5.2.130.0050.0289.20
5.2.120.0060.0279.20
5.2.110.0020.0329.21
5.2.100.0030.0319.20
5.2.90.0030.0329.20
5.2.80.0050.0309.20
5.2.70.0050.0299.20
5.2.60.0040.0309.16
5.2.50.0030.0319.13
5.2.40.0060.0299.10
5.2.30.0050.0299.07
5.2.20.0050.0279.05
5.2.10.0020.0308.96
5.2.00.0040.0318.83
5.1.60.0070.0288.11
5.1.50.0060.0238.11
5.1.40.0040.0248.09
5.1.30.0080.0278.44
5.1.20.0050.0268.46
5.1.10.0060.0238.19
5.1.00.0050.0308.19
5.0.50.0080.0236.67
5.0.40.0060.0246.52
5.0.30.0030.0326.34
5.0.20.0070.0286.31
5.0.10.0060.0266.29
5.0.00.0040.0416.27
4.4.90.0050.0204.78
4.4.80.0120.0344.76
4.4.70.0050.0184.75
4.4.60.0070.0174.75
4.4.50.0090.0174.77
4.4.40.0070.0594.70
4.4.30.0030.0244.76
4.4.20.0110.0344.84
4.4.10.0070.0224.85
4.4.00.0090.0324.76
4.3.110.0030.0194.67
4.3.100.0080.0324.66
4.3.90.0080.0174.63
4.3.80.0080.0334.59
4.3.70.0130.0514.63
4.3.60.0080.0234.63
4.3.50.0070.0304.63
4.3.40.0030.0804.54
4.3.30.0060.0243.30
4.3.20.0050.0353.28
4.3.10.0110.0373.24
4.3.00.0030.02015.17

preferences:
44.9 ms | 401 KiB | 5 Q