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 = null; } 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'; 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, '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.0110.00716.62
8.3.50.0180.00922.80
8.3.40.0120.00319.09
8.3.30.0070.00718.78
8.3.20.0040.00420.34
8.3.10.0040.00421.76
8.3.00.0080.00019.68
8.2.180.0180.00417.00
8.2.170.0060.00922.96
8.2.160.0070.00720.27
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0050.00226.16
8.2.120.0080.00021.02
8.2.110.0060.00322.25
8.2.100.0090.00319.51
8.2.90.0050.00319.05
8.2.80.0000.00817.97
8.2.70.0060.00317.63
8.2.60.0000.00817.93
8.2.50.0030.00618.07
8.2.40.0090.00018.22
8.2.30.0050.00217.96
8.2.20.0000.00817.64
8.2.10.0050.00318.14
8.2.00.0000.00717.70
8.1.280.0030.01025.92
8.1.270.0040.00423.79
8.1.260.0050.00226.35
8.1.250.0070.00028.09
8.1.240.0040.00424.03
8.1.230.0070.00419.03
8.1.220.0030.00617.74
8.1.210.0040.00418.77
8.1.200.0000.00817.35
8.1.190.0040.00417.11
8.1.180.0040.00418.10
8.1.170.0030.00518.56
8.1.160.0070.00021.88
8.1.150.0070.00018.89
8.1.140.0000.00717.32
8.1.130.0070.00019.04
8.1.120.0000.00717.40
8.1.110.0080.00017.43
8.1.100.0050.00217.40
8.1.90.0000.00717.42
8.1.80.0040.00417.33
8.1.70.0070.00017.28
8.1.60.0040.00417.66
8.1.50.0040.00417.45
8.1.40.0080.00017.44
8.1.30.0030.00517.63
8.1.20.0040.00417.67
8.1.10.0000.00817.60
8.1.00.0070.00017.44
8.0.300.0000.00718.77
8.0.290.0070.00016.75
8.0.280.0030.00318.34
8.0.270.0040.00417.26
8.0.260.0000.00816.83
8.0.250.0000.00717.00
8.0.240.0060.00317.02
8.0.230.0000.00716.85
8.0.220.0030.00316.85
8.0.210.0000.00716.81
8.0.200.0040.00416.86
8.0.190.0040.00417.00
8.0.180.0000.00716.98
8.0.170.0040.00416.94
8.0.160.0040.00416.86
8.0.150.0040.00416.93
8.0.140.0030.00716.91
8.0.130.0000.00513.32
8.0.120.0040.00416.90
8.0.110.0040.00416.93
8.0.100.0000.00816.81
8.0.90.0030.00316.80
8.0.80.0130.00616.91
8.0.70.0000.00716.83
8.0.60.0050.00316.83
8.0.50.0050.00316.89
8.0.30.0100.01216.96
8.0.20.0100.01117.40
8.0.10.0000.00716.91
8.0.00.0070.01716.83
7.4.330.0030.00315.01
7.4.320.0000.00716.48
7.4.300.0060.00016.67
7.4.290.0030.00516.52
7.4.280.0050.00216.56
7.4.270.0000.00716.64
7.4.260.0000.00716.41
7.4.250.0040.00416.56
7.4.240.0050.00316.57
7.4.230.0000.00716.39
7.4.220.0070.01116.71
7.4.210.0060.00916.63
7.4.200.0070.00016.72
7.4.160.0040.01116.61
7.4.150.0070.01117.40
7.4.140.0070.01217.86
7.4.130.0110.00816.59
7.4.120.0090.00916.57
7.4.110.0090.00716.56
7.4.100.0130.00616.43
7.4.90.0060.01216.60
7.4.80.0090.01219.39
7.4.70.0030.01316.56
7.4.60.0030.01316.68
7.4.50.0050.00016.48
7.4.40.0040.01216.55
7.4.30.0130.00316.41
7.4.00.0070.00915.15
7.3.330.0000.00613.38
7.3.320.0000.00513.37
7.3.310.0000.00716.24
7.3.300.0070.00016.33
7.3.290.0090.00616.31
7.3.280.0070.01016.38
7.3.270.0090.00917.40
7.3.260.0090.00916.59
7.3.250.0170.00516.42
7.3.240.0060.01516.44
7.3.230.0140.00316.58
7.3.210.0120.00616.61
7.3.200.0140.00719.39
7.3.190.0130.00316.45
7.3.180.0160.00016.45
7.3.170.0170.00316.49
7.3.160.0090.00916.49
7.3.120.0090.00514.75
7.3.110.0110.00714.89
7.3.100.0110.00714.88
7.3.90.0070.00714.92
7.3.80.0040.01114.83
7.3.70.0070.00714.70
7.3.60.0060.00614.80
7.3.50.0030.00614.57
7.3.40.0070.00714.83
7.3.30.0090.00914.51
7.3.20.0060.00916.62
7.3.10.0030.00916.49
7.3.00.0050.00716.58
7.2.330.0120.00916.43
7.2.320.0120.00416.62
7.2.310.0070.01016.86
7.2.300.0080.00816.70
7.2.290.0090.00616.30
7.2.250.0100.01014.99
7.2.240.0140.00314.93
7.2.230.0060.01014.86
7.2.220.0000.01415.09
7.2.210.0030.01215.18
7.2.200.0100.01015.01
7.2.190.0080.00415.05
7.2.180.0100.01014.70
7.2.170.0120.00315.04
7.2.130.0030.00616.90
7.2.120.0070.00716.64
7.2.110.0090.00616.80
7.2.100.0000.01016.75
7.2.90.0060.00816.90
7.2.80.0040.00816.98
7.2.70.0040.01117.01
7.2.60.0070.00716.95
7.2.50.0100.00316.91
7.2.40.0050.00516.66
7.2.30.0000.01516.98
7.2.20.0110.00316.89
7.2.10.0120.00317.12
7.2.00.0030.00818.11
7.1.330.0040.01115.90
7.1.320.0110.00415.68
7.1.310.0030.01215.75
7.1.300.0070.00615.68
7.1.290.0110.00415.88
7.1.280.0060.00915.64
7.1.270.0070.00715.80
7.1.260.0050.00515.57
7.1.250.0070.00715.68
7.1.200.0050.00515.74
7.1.100.0110.01518.09
7.1.70.0030.00617.12
7.1.60.0110.00719.40
7.1.50.0100.01316.66
7.1.00.0000.08022.37
7.0.200.0040.00816.68
7.0.140.0100.06722.11
7.0.60.0100.04019.91
7.0.50.0030.05717.85
7.0.40.0070.06320.15
7.0.30.0230.05720.17
7.0.20.0270.05720.23
7.0.10.0030.04320.26
7.0.00.0170.08020.23
5.6.280.0070.07021.14
5.6.210.0070.05020.66
5.6.200.0030.09018.18
5.6.190.0100.06020.48
5.6.180.0200.04320.55
5.6.170.0230.03320.45
5.6.160.0130.03320.57
5.6.150.0070.04318.28
5.6.140.0100.07318.25
5.6.130.0030.04318.20
5.6.120.0030.09021.16
5.6.110.0000.04720.99
5.6.100.0070.08321.13
5.6.90.0070.05321.02
5.6.80.0000.08320.45
5.5.350.4230.04720.45
5.5.340.0200.06717.98
5.5.330.0230.06320.41
5.5.320.0270.04720.30
5.5.310.0330.05720.35
5.5.300.0030.06717.97
5.5.290.0030.09317.98
5.5.280.0130.07320.98
5.5.270.0030.05020.82
5.5.260.0030.08720.88
5.5.250.0200.05320.73
5.5.240.0030.08020.27
5.4.450.0330.04319.31
5.4.440.0470.05019.32
5.4.430.0400.04019.30
5.4.420.0470.04319.47
5.4.410.0370.05319.26
5.4.400.0330.03319.29
5.4.390.0300.04319.00
5.4.380.0800.04718.73
5.4.370.0970.05318.61
5.4.360.1000.04318.77
5.4.350.1070.04718.55
5.4.340.1000.05018.63
5.4.320.0050.03912.52
5.4.310.0060.03712.51
5.4.300.0040.03812.52
5.4.290.0040.03912.51
5.4.280.0080.03212.41
5.4.270.0050.03712.41
5.4.260.0030.04012.41
5.4.250.0050.03612.41
5.4.240.0060.03512.41
5.4.230.0040.03912.40
5.4.220.0020.03912.40
5.4.210.0040.03612.40
5.4.200.0040.04412.40
5.4.190.0060.03912.39
5.4.180.0070.03912.40
5.4.170.0080.03212.41
5.4.160.0030.03712.40
5.4.150.0070.03612.41
5.4.140.0040.03812.09
5.4.130.0060.03512.07
5.4.120.0050.04312.04
5.4.110.0050.03412.03
5.4.100.0060.03312.03
5.4.90.0050.04412.03
5.4.80.0040.03712.03
5.4.70.0060.03312.02
5.4.60.0070.03412.02
5.4.50.0040.03612.02
5.4.40.0030.04412.01
5.4.30.0060.04012.01
5.4.20.0060.03912.00
5.4.10.0050.03412.00
5.4.00.0090.03511.50
5.3.290.0110.03612.80
5.3.280.0070.03512.71
5.3.270.0060.03912.72
5.3.260.0040.04012.72
5.3.250.0080.03412.72
5.3.240.0070.04212.72
5.3.230.0060.04112.70
5.3.220.0070.03612.68
5.3.210.0030.04312.68
5.3.200.0050.03912.68
5.3.190.0060.03512.68
5.3.180.0080.03312.67
5.3.170.0060.04212.67
5.3.160.0090.03712.67
5.3.150.0100.03712.67
5.3.140.0030.03712.66
5.3.130.0040.03912.66
5.3.120.0060.03812.65
5.3.110.0060.03712.66
5.3.100.0030.03812.13
5.3.90.0060.03412.12
5.3.80.0070.03412.12
5.3.70.0080.03312.12
5.3.60.0070.03412.10
5.3.50.0030.03712.05
5.3.40.0070.03912.05
5.3.30.0080.03512.00
5.3.20.0040.03611.79
5.3.10.0080.03111.75
5.3.00.0060.03911.74
5.2.170.0050.0339.24
5.2.160.0060.0299.24
5.2.150.0020.0359.25
5.2.140.0050.0329.24
5.2.130.0040.0309.20
5.2.120.0050.0289.20
5.2.110.0030.0319.21
5.2.100.0060.0269.20
5.2.90.0050.0289.21
5.2.80.0020.0329.20
5.2.70.0040.0299.20
5.2.60.0030.0309.15
5.2.50.0030.0359.13
5.2.40.0020.0319.10
5.2.30.0030.0379.07
5.2.20.0030.0299.05
5.2.10.0040.0298.96
5.2.00.0050.0278.84
5.1.60.0040.0288.11
5.1.50.0030.0258.11
5.1.40.0060.0228.09
5.1.30.0060.0298.45
5.1.20.0020.0288.46
5.1.10.0040.0318.19
5.1.00.0040.0248.19
5.0.50.0050.0186.67
5.0.40.0030.0196.52
5.0.30.0000.0346.33
5.0.20.0020.0206.30
5.0.10.0040.0186.28
5.0.00.0030.0306.27
4.4.90.0030.0144.78
4.4.80.0020.0154.75
4.4.70.0050.0134.75
4.4.60.0020.0154.76
4.4.50.0030.0164.77
4.4.40.0010.0264.71
4.4.30.0040.0194.76
4.4.20.0010.0214.84
4.4.10.0050.0174.85
4.4.00.0020.0294.76
4.3.110.0020.0164.67
4.3.100.0020.0154.66
4.3.90.0020.0164.64
4.3.80.0000.0264.59
4.3.70.0040.0224.63
4.3.60.0040.0124.63
4.3.50.0040.0134.62
4.3.40.0020.0294.54
4.3.30.0010.0163.30
4.3.20.0020.0153.28
4.3.10.0050.0123.23
4.3.00.0070.01315.17

preferences:
47.98 ms | 401 KiB | 5 Q