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, 'George RR Martin')); 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.0070.00716.75
8.3.50.0190.00822.90
8.3.40.0160.00318.86
8.3.30.0110.00418.84
8.3.20.0070.00020.46
8.3.10.0080.00021.94
8.3.00.0040.00417.66
8.2.180.0110.01116.38
8.2.170.0120.00322.96
8.2.160.0000.01320.53
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0080.00020.33
8.2.110.0060.00322.26
8.2.100.0080.00417.68
8.2.90.0030.00519.08
8.2.80.0040.00417.97
8.2.70.0040.00417.38
8.2.60.0040.00417.80
8.2.50.0040.00418.07
8.2.40.0000.00818.22
8.2.30.0040.00418.08
8.2.20.0000.00717.75
8.2.10.0050.00318.05
8.2.00.0070.00017.70
8.1.280.0140.00325.92
8.1.270.0050.00323.91
8.1.260.0040.00426.35
8.1.250.0060.00328.09
8.1.240.0060.00320.69
8.1.230.0090.00320.83
8.1.220.0040.00418.77
8.1.210.0050.00318.96
8.1.200.0060.00317.22
8.1.190.0060.00317.10
8.1.180.0030.00518.10
8.1.170.0000.00818.42
8.1.160.0040.00422.04
8.1.150.0040.00418.83
8.1.140.0060.00317.33
8.1.130.0040.00417.76
8.1.120.0000.00717.41
8.1.110.0080.00017.32
8.1.100.0070.00017.36
8.1.90.0000.00717.30
8.1.80.0040.00417.30
8.1.70.0030.00317.42
8.1.60.0000.00817.60
8.1.50.0000.00817.57
8.1.40.0030.00517.55
8.1.30.0050.00317.63
8.1.20.0030.00517.57
8.1.10.0000.00717.55
8.1.00.0040.00417.53
8.0.300.0030.00619.77
8.0.290.0060.00316.63
8.0.280.0000.00718.36
8.0.270.0000.00717.27
8.0.260.0070.00017.22
8.0.250.0040.00416.91
8.0.240.0050.00316.93
8.0.230.0000.00716.89
8.0.220.0000.00816.73
8.0.210.0030.00316.73
8.0.200.0030.00316.89
8.0.190.0000.00716.85
8.0.180.0000.00716.88
8.0.170.0060.00316.93
8.0.160.0040.00416.83
8.0.150.0040.00416.79
8.0.140.0080.00316.70
8.0.130.0030.00313.28
8.0.120.0040.00416.84
8.0.110.0000.00716.89
8.0.100.0080.00016.82
8.0.90.0000.00816.70
8.0.80.0120.00316.89
8.0.70.0000.00716.66
8.0.60.0070.00016.80
8.0.50.0020.00516.73
8.0.30.0070.01217.04
8.0.20.0130.00817.40
8.0.10.0050.00316.84
8.0.00.0080.01216.59
7.4.330.0030.00315.00
7.4.320.0000.00716.53
7.4.300.0000.00616.67
7.4.290.0040.00416.66
7.4.280.0000.00716.50
7.4.270.0040.00416.54
7.4.260.0070.00016.53
7.4.250.0050.00316.59
7.4.240.0030.00416.65
7.4.230.0030.00316.34
7.4.220.0030.01316.48
7.4.210.0030.01216.56
7.4.200.0070.00016.70
7.4.160.0040.01116.55
7.4.150.0100.01017.40
7.4.140.0120.00517.86
7.4.130.0060.01016.52
7.4.120.0120.00616.40
7.4.110.0100.00716.63
7.4.100.0090.01216.49
7.4.90.0140.00316.56
7.4.80.0060.01519.39
7.4.70.0000.02016.50
7.4.60.0110.01016.53
7.4.50.0000.00716.61
7.4.40.0110.00516.36
7.4.30.0100.00716.39
7.4.00.0030.01015.17
7.3.330.0000.00613.13
7.3.320.0000.00513.31
7.3.310.0040.00416.22
7.3.300.0080.00016.17
7.3.290.0100.01016.39
7.3.280.0090.00816.32
7.3.270.0160.01017.40
7.3.260.0060.01216.55
7.3.250.0090.01316.44
7.3.240.0130.00516.53
7.3.230.0000.01716.55
7.3.210.0030.01416.50
7.3.200.0160.00319.39
7.3.190.0100.00716.54
7.3.180.0090.00616.47
7.3.170.0130.00316.27
7.3.160.0080.00816.21
7.3.120.0050.00514.81
7.2.330.0090.00916.50
7.2.320.0060.00916.56
7.2.310.0100.01616.61
7.2.300.0030.01416.66
7.2.290.0100.00616.61
7.2.00.0100.00719.29
7.1.100.0030.00618.01
7.1.70.0090.00516.90
7.1.60.0040.01819.40
7.1.50.0060.01616.98
7.1.00.0000.08022.40
7.0.200.0070.00416.82
7.0.140.0000.07321.92
7.0.60.0130.06721.59
7.0.50.0070.04717.88
7.0.40.0100.04319.96
7.0.30.0100.04720.23
7.0.20.0270.08720.06
7.0.10.0170.08020.24
7.0.00.0100.07720.16
5.6.210.0030.04320.49
5.6.200.0030.04018.19
5.6.190.0070.04320.39
5.6.180.0400.04020.77
5.6.170.0400.07020.55
5.6.160.0100.07320.51
5.6.150.0070.04018.24
5.6.140.0070.06718.29
5.6.130.0100.05018.15
5.6.120.0130.08021.12
5.6.110.0100.08021.04
5.6.100.0030.08320.98
5.6.90.0130.07720.89
5.6.80.0000.08020.37
5.5.350.0030.07720.44
5.5.340.0100.04017.99
5.5.330.0070.05020.35
5.5.320.0230.04020.38
5.5.310.0200.03720.35
5.5.300.0130.07017.95
5.5.290.0070.08018.04
5.5.280.0030.04020.79
5.5.270.0100.07020.74
5.5.260.0230.06720.66
5.5.250.0130.06320.57
5.5.240.0300.06320.28
5.4.450.3200.04319.47
5.4.440.0030.04019.39
5.4.430.1200.04319.46
5.4.420.4030.04719.25
5.4.410.4570.03319.16
5.4.400.3870.04019.07
5.4.390.3370.03319.14
5.4.380.4630.03018.99
5.4.370.4600.04318.93
5.4.360.3730.04018.98
5.4.350.3970.03319.12
5.4.340.4200.03319.06
5.4.320.3700.03319.22
5.4.310.4230.04318.95
5.4.300.3630.03718.95
5.4.290.3230.04019.12
5.4.280.5400.04319.14
5.4.270.3970.04719.14
5.4.260.3670.03719.11
5.4.250.0030.04719.17
5.4.240.2300.04719.17
5.4.230.5170.03718.91
5.4.220.3370.03719.13
5.4.210.3730.04019.21
5.4.200.3730.03319.13
5.4.190.4500.04019.20
5.4.180.4500.04019.04
5.4.170.5170.04319.12
5.4.160.0070.06019.21
5.4.150.0930.07019.01
5.4.140.4500.04016.41
5.4.130.4470.04016.40
5.4.120.3800.03016.49
5.4.110.3800.03716.68
5.4.100.4200.03316.31
5.4.90.4070.03316.61
5.4.80.4400.03716.39
5.4.70.4430.03316.59
5.4.60.4800.03016.46
5.4.50.4600.03316.30
5.4.40.4100.03716.30
5.4.30.5500.04016.49
5.4.20.4500.03716.45
5.4.10.3800.04316.45
5.4.00.3900.03715.94
5.3.290.4700.04014.70
5.3.280.3530.04714.61
5.3.270.5230.03714.65
5.3.260.0070.07314.66
5.3.250.4370.04314.65
5.3.240.4270.04014.77
5.3.230.3900.04014.54
5.3.220.3730.03314.61
5.3.210.3830.03714.61
5.3.200.3500.03714.61
5.3.190.4430.04014.66
5.3.180.4930.03014.62
5.3.170.4600.03714.59
5.3.160.4700.03014.65
5.3.150.4970.04014.73
5.3.140.4570.03314.57
5.3.130.4630.02714.56
5.3.120.3830.04014.56
5.3.110.4230.03314.59
5.3.100.4230.03714.07
5.3.90.3630.03714.20
5.3.80.3670.03313.96
5.3.70.3670.04314.04
5.3.60.3370.03713.94
5.3.50.2770.03714.14
5.3.40.3070.03314.02
5.3.30.3500.03013.95
5.3.20.2870.03713.76
5.3.10.2530.03713.73
5.3.00.3130.03313.80
5.2.170.2870.03011.06
5.2.160.2870.02311.13
5.2.150.2130.03011.10
5.2.140.2200.03011.06
5.2.130.2400.03711.18
5.2.120.3570.03311.13
5.2.110.2070.02011.17
5.2.100.1530.02711.27
5.2.90.2430.02711.28
5.2.80.2670.02011.17
5.2.70.3170.02711.08
5.2.60.2930.02711.13
5.2.50.2930.02710.94
5.2.40.2700.02311.01
5.2.30.2600.03311.05
5.2.20.2330.03011.16
5.2.10.2600.03010.84
5.2.00.2600.03010.89
5.1.60.2470.0279.92
5.1.50.2570.0239.93
5.1.40.2300.02710.07
5.1.30.2630.02310.27
5.1.20.2630.02710.42
5.1.10.2630.03010.13
5.1.00.2530.02710.23
5.0.50.0930.0138.62
5.0.40.1430.0238.39
5.0.30.1700.0338.31
5.0.20.1530.0178.20
5.0.10.1470.0238.34
5.0.00.1670.0278.11
4.4.90.1500.0176.35
4.4.80.0970.0176.35
4.4.70.1430.0206.35
4.4.60.1230.0176.35
4.4.50.1330.0136.35
4.4.40.1130.0276.35
4.4.30.1130.0176.35
4.4.20.1370.0176.35
4.4.10.1370.0136.35
4.4.00.1200.0206.35
4.3.110.1300.0136.35
4.3.100.1270.0176.35
4.3.90.1370.0136.35
4.3.80.1700.0236.35
4.3.70.1570.0176.35
4.3.60.1630.0176.35
4.3.50.1370.0176.35
4.3.40.1670.0236.35
4.3.30.0900.0276.35
4.3.20.0800.0276.35
4.3.10.0730.0176.35
4.3.00.0830.0236.35

preferences:
46.37 ms | 401 KiB | 5 Q