3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface NodeInterface { public function eval() : int; } class Node implements NodeInterface { public int $value; public string $sign; public Node $rightChild; public Node $leftChild; public function eval() { if ($rightChild != null) { return $this->value; } switch ($this->sign) { case "+": return $this->leftChild->value + $this->rightChild->value; //... } } } $root = new Node(); $root->value = 10; echo $root->eval();

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.130.0000.00818.60
8.3.120.0050.00520.79
8.3.110.0110.00020.94
8.3.100.0000.00924.06
8.3.90.0030.00626.77
8.3.80.0060.00316.88
8.3.70.0070.01316.58
8.3.60.0130.00618.27
8.3.50.0130.00319.77
8.3.40.0040.01118.85
8.3.30.0090.00618.57
8.3.20.0070.00024.18
8.3.10.0000.00824.66
8.3.00.0080.00026.16
8.2.250.0040.00416.68
8.2.240.0030.00617.04
8.2.230.0030.00522.58
8.2.220.0040.01237.54
8.2.210.0040.00426.77
8.2.200.0060.00616.63
8.2.190.0180.00016.63
8.2.180.0140.00725.92
8.2.170.0090.00618.86
8.2.160.0070.00722.96
8.2.150.0060.00325.66
8.2.140.0060.00324.66
8.2.130.0070.00026.16
8.2.120.0070.00026.16
8.2.110.0050.00520.52
8.2.100.0070.00717.63
8.2.90.0090.00018.09
8.2.80.0040.00417.97
8.2.70.0060.00317.60
8.2.60.0050.00317.80
8.2.50.0000.00717.80
8.2.40.0040.00421.25
8.2.30.0030.00617.68
8.2.20.0050.00220.68
8.2.10.0030.00517.64
8.2.00.0000.00919.09
8.1.300.0050.00517.48
8.1.290.0040.00418.88
8.1.280.0060.01025.92
8.1.270.0080.00023.99
8.1.260.0000.00726.35
8.1.250.0050.00328.09
8.1.240.0090.00020.37
8.1.230.0060.00620.84
8.1.220.0040.00417.74
8.1.210.0050.00318.77
8.1.200.0030.00617.22
8.1.190.0050.00317.23
8.1.180.0000.00818.10
8.1.170.0030.00517.62
8.1.160.0000.00718.79
8.1.150.0000.00718.46
8.1.140.0000.00817.30
8.1.130.0000.00717.40
8.1.120.0000.00717.41
8.1.110.0020.00517.28
8.1.100.0000.00817.39
8.1.90.0050.00317.31
8.1.80.0000.00917.30
8.1.70.0000.00717.32
8.1.60.0000.00717.57
8.1.50.0040.00417.41
8.1.40.0000.00717.41
8.1.30.0050.00317.52
8.1.20.0050.00517.61
8.1.10.0000.00717.35
8.1.00.0040.00417.21
8.0.300.0070.00021.51
8.0.290.0040.00416.75
8.0.280.0030.00318.31
8.0.270.0040.00416.80
8.0.260.0040.00416.82
8.0.250.0090.00016.95
8.0.240.0040.00416.98
8.0.230.0030.00516.92
8.0.220.0060.00016.89
8.0.210.0000.00716.79
8.0.200.0030.00316.87
8.0.190.0000.00816.93
8.0.180.0040.00416.91
8.0.170.0090.00016.93
8.0.160.0050.00316.88
8.0.150.0000.00716.91
8.0.140.0050.00316.89
8.0.130.0070.00916.85
8.0.120.0040.00916.84
8.0.110.0050.00716.64
8.0.100.0100.00916.71
8.0.90.0120.00616.64
8.0.80.0140.00516.85
8.0.70.0160.00416.71
8.0.60.0170.00216.75
8.0.50.0100.01016.85
8.0.30.0200.00016.81
8.0.20.0070.01216.86
8.0.10.0160.00216.85
8.0.00.0030.00716.98
7.4.330.0000.00615.55
7.4.320.0060.00016.55
7.4.300.0060.00016.53
7.4.290.0030.00516.52
7.4.280.0040.00416.52
7.4.270.0050.00316.56
7.4.260.0130.00716.54
7.4.250.0170.00816.55
7.4.240.0220.00016.49
7.4.230.0090.00416.56
7.4.220.0020.01116.49
7.4.210.0160.00016.54
7.4.200.0100.00616.37
7.4.190.0190.00316.45
7.4.180.0170.00316.55
7.4.160.0140.00316.59
7.4.150.0150.00416.45
7.4.140.0100.00716.37
7.4.130.0170.00316.16
7.4.120.0160.00416.31
7.4.110.0120.00616.30
7.4.100.0170.00716.36
7.4.90.0160.00316.46
7.4.80.0160.00516.16
7.4.70.0110.00716.32
7.4.60.0140.00716.24
7.4.50.0150.00816.17
7.4.40.0170.00316.27
7.4.30.0150.00616.30
7.4.20.0120.00916.31
7.4.10.0090.01216.21
7.4.00.0140.00716.36
7.3.330.0200.00216.00
7.3.320.0160.00416.29
7.3.310.0090.00416.11
7.3.300.0090.00515.93
7.3.290.0090.00516.21
7.3.280.0170.00216.09
7.3.270.0130.00816.13
7.3.260.0180.00316.30
7.3.250.0180.00416.04
7.3.240.0200.00016.12
7.3.230.0150.00716.10
7.3.220.0160.00616.13
7.3.210.0150.00616.23
7.3.200.0180.00216.06
7.3.190.0140.00616.06
7.3.180.0060.00316.05
7.3.170.0100.00015.97
7.3.160.0100.00516.05
7.3.150.0160.00015.87
7.3.140.0140.00716.19
7.3.130.0100.00016.09

preferences:
53.15 ms | 403 KiB | 5 Q