3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Node { public $next = null; // define public to allow simple test case writing private $id; public function __construct($id) { $this->id = $id; } public function setNext(Node $next) { $this->next = $next; } public function action() { if ($this->next) { $this->next->action(); } echo "action for {$this->id}" . PHP_EOL; } } // make a node list manually for testing $id = 0; $root = new Node(++ $id); $root->next = new Node(++ $id); $root->next = new Node(++ $id); $root->next->next = new Node(++ $id); $root->next->next->next = new Node(++ $id); $root->next->next->next->next = new Node(++ $id); $root->next->next->next->next->next = new Node(++ $id); $root->action();

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.00718.31
8.3.50.0110.00717.92
8.3.40.0090.00618.82
8.3.30.0070.00718.55
8.3.20.0080.00018.44
8.3.10.0050.00221.74
8.3.00.0070.00021.89
8.2.180.0090.01218.42
8.2.170.0150.00622.96
8.2.160.0110.00418.82
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0030.00521.87
8.2.120.0040.00426.35
8.2.110.0060.00319.21
8.2.100.0080.00417.91
8.2.90.0000.00817.97
8.2.80.0040.00417.97
8.2.70.0030.00517.80
8.2.60.0000.00718.03
8.2.50.0030.00518.10
8.2.40.0050.00321.07
8.2.30.0050.00320.60
8.2.20.0030.00618.02
8.2.10.0050.00317.96
8.2.00.0000.00819.50
8.1.280.0140.00425.92
8.1.270.0040.00420.21
8.1.260.0060.00326.35
8.1.250.0070.00028.09
8.1.240.0060.00323.88
8.1.230.0060.00622.68
8.1.220.0040.00417.74
8.1.210.0110.00418.82
8.1.200.0040.00417.35
8.1.190.0080.00017.23
8.1.180.0000.00818.10
8.1.170.0000.00818.53
8.1.160.0070.00018.96
8.1.150.0030.00518.76
8.1.140.0000.00718.82
8.1.130.0030.00520.04
8.1.120.0110.00017.53
8.1.110.0000.00817.46
8.1.100.0030.00317.52
8.1.90.0030.00517.50
8.1.80.0040.00417.51
8.1.70.0000.00717.48
8.1.60.0030.00617.67
8.1.50.0030.00617.52
8.1.40.0000.00817.53
8.1.30.0050.00317.59
8.1.20.0040.00417.68
8.1.10.0000.00817.49
8.1.00.0040.00417.59
8.0.300.0000.00820.00
8.0.290.0000.01016.63
8.0.280.0030.00318.38
8.0.270.0030.00317.21
8.0.260.0000.00618.41
8.0.250.0080.00316.94
8.0.240.0030.00317.02
8.0.230.0030.00617.04
8.0.220.0000.00817.00
8.0.210.0040.00416.97
8.0.200.0040.00416.95
8.0.190.0040.00416.87
8.0.180.0050.00316.93
8.0.170.0000.00916.91
8.0.160.0040.00416.91
8.0.150.0050.00316.89
8.0.140.0040.00416.87
8.0.130.0030.00313.40
8.0.120.0000.00716.91
8.0.110.0070.00316.74
8.0.100.0040.00416.80
8.0.90.0040.00416.96
8.0.80.0090.00816.98
8.0.70.0040.00416.78
8.0.60.0050.00216.83
8.0.50.0070.00016.74
8.0.30.0110.00717.16
8.0.20.0050.01317.40
8.0.10.0070.00017.09
8.0.00.0100.01016.90
7.4.330.0000.00515.55
7.4.320.0030.00316.48
7.4.300.0000.00716.45
7.4.290.0000.01216.43
7.4.280.0030.00616.63
7.4.270.0070.00016.54
7.4.260.0030.00316.63
7.4.250.0050.00316.55
7.4.240.0030.00516.67
7.4.230.0070.00016.42
7.4.220.0070.00016.63
7.4.210.0090.01016.62
7.4.200.0000.00716.37
7.4.160.0100.00716.60
7.4.140.0110.00817.86
7.4.130.0060.01216.40
7.4.120.0120.00816.51
7.4.110.0100.00716.45
7.4.100.0130.01016.55
7.4.90.0090.00916.64
7.4.80.0090.00919.39
7.4.70.0100.00716.36
7.4.60.0140.00616.41
7.4.50.0060.01216.28
7.4.40.0060.01216.40
7.4.10.0100.00715.06
7.4.00.0090.00615.03
7.3.330.0020.00213.15
7.3.320.0000.00613.14
7.3.310.0050.00316.34
7.3.300.0000.00716.32
7.3.290.0030.00316.18
7.3.280.0170.00716.28
7.3.260.0120.00816.54
7.3.240.0080.01016.57
7.3.230.0080.00916.33
7.3.210.0140.00916.50
7.3.200.0090.00916.50
7.3.190.0030.01316.59
7.3.180.0070.01116.20
7.3.170.0110.01216.45
7.3.160.0090.00816.49
7.3.130.0100.01014.94
7.3.120.0040.01514.58
7.3.110.0070.01014.86
7.3.100.0030.01314.68
7.3.90.0060.00314.81
7.3.80.0000.01114.71
7.3.70.0070.00714.73
7.3.60.0000.01114.95
7.3.50.0110.00414.88
7.3.40.0030.00914.94
7.3.30.0000.00914.82
7.3.20.0130.00016.49
7.3.10.0120.00416.60
7.3.00.0120.00316.56
7.2.330.0070.01616.80
7.2.320.0120.01216.47
7.2.310.0100.00916.74
7.2.300.0090.01316.89
7.2.290.0140.00816.80
7.2.260.0030.01415.34
7.2.250.0140.00415.41
7.2.240.0040.01115.01
7.2.230.0040.01115.36
7.2.220.0070.00715.18
7.2.210.0100.00615.12
7.2.200.0060.00915.22
7.2.190.0090.00615.05
7.2.180.0060.00915.13
7.2.170.0120.00315.26
7.2.160.0060.01015.08
7.2.150.0040.01116.95
7.2.140.0090.00016.60
7.2.130.0090.00417.11
7.2.120.0060.00916.98
7.2.110.0030.01017.00
7.2.100.0540.00915.88
7.2.90.0570.00715.95
7.2.80.0350.00715.75
7.2.70.0480.01215.80
7.2.60.0350.00615.90
7.2.50.0580.00815.79
7.2.40.0500.00516.12
7.2.30.0470.00615.95
7.2.20.0610.00715.74
7.2.10.0330.01216.02
7.2.00.0420.00715.96
7.1.330.0030.00715.67
7.1.320.0100.00315.71
7.1.310.0030.01115.93
7.1.300.0000.01315.73
7.1.290.0060.00315.71
7.1.280.0070.00715.77
7.1.270.0060.00315.71
7.1.260.0000.01415.84
7.1.250.0070.00715.82
7.1.240.0040.01115.80
7.1.230.0030.00915.90
7.1.220.0040.00715.75
7.1.210.0330.00514.85
7.1.200.0300.00914.60
7.1.190.0320.00914.64
7.1.180.0500.00814.61
7.1.170.0500.01214.83
7.1.160.0420.00714.63
7.1.150.0430.00414.75
7.1.140.0400.00714.70
7.1.130.0370.01214.62
7.1.120.0450.00514.82
7.1.110.0430.00714.84
7.1.100.0560.00814.76
7.1.90.0440.00514.61
7.1.80.0490.00914.69
7.1.70.0480.00614.85
7.1.60.0530.00923.60
7.1.50.0580.01323.65
7.1.40.0460.01223.81
7.1.30.0640.01023.72
7.1.20.0500.01023.82
7.1.10.0520.00714.68
7.1.00.1230.00514.80
7.0.330.0030.01015.42
7.0.320.0030.01015.26
7.0.310.0000.01615.49
7.0.300.0080.00415.49
7.0.290.0080.00015.25
7.0.280.0060.00315.22
7.0.270.0070.00715.48
7.0.260.0030.00615.45
7.0.250.0030.00615.25
7.0.240.0070.00715.43
7.0.230.0030.01015.52
7.0.220.0060.00315.52
7.0.210.0060.00615.58
7.0.200.0110.00415.25
7.0.190.0050.00515.52
7.0.180.0080.00315.24
7.0.170.0060.00615.39
7.0.160.0070.00715.58
7.0.150.0060.00915.48
7.0.140.0070.01015.47
7.0.130.0060.00615.34
7.0.120.0030.01015.36
7.0.110.0120.00415.42
7.0.100.0070.00715.48
7.0.90.0060.00315.20
7.0.80.0030.01015.29
7.0.70.0050.00315.44
7.0.60.0030.01015.41
7.0.50.0080.00415.37
7.0.40.0070.00713.52
7.0.30.0060.00913.54
7.0.20.0100.00313.58
7.0.10.0090.00313.57
7.0.00.0030.01013.51
5.6.400.0030.00614.50
5.6.390.0030.00914.60
5.6.380.0030.01014.21
5.6.370.0030.01014.39
5.6.360.0090.00614.71
5.6.350.0040.01114.46
5.6.340.0030.01314.34
5.6.330.0070.00714.27
5.6.320.0030.00914.64
5.6.310.0110.00314.71
5.6.300.0100.00314.51
5.6.290.0060.00914.35
5.6.280.0070.00414.48
5.6.270.0060.00914.08
5.6.260.0060.00914.25
5.6.250.0000.01714.67
5.6.240.0030.00914.08
5.6.230.0060.00614.23
5.6.220.0040.00814.38
5.6.210.0060.00614.48
5.6.200.0030.01314.47
5.6.190.0030.01014.31
5.6.180.0130.00314.29
5.6.170.0000.01314.38
5.6.160.0040.00414.62
5.6.150.0040.00814.52
5.6.140.0030.01014.49
5.6.130.0100.00714.66
5.6.120.0030.01014.36
5.6.110.0110.00414.68
5.6.100.0060.00614.09
5.6.90.0040.01114.08
5.6.80.0030.01014.51
5.6.70.0070.01014.56
5.6.60.0120.01214.17
5.6.50.0080.00014.62
5.6.40.0030.00914.42
5.6.30.0000.01314.30
5.6.20.0030.01014.16
5.6.10.0030.01614.40
5.6.00.0030.01314.60

preferences:
34.49 ms | 400 KiB | 5 Q