3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class SudokuSolver { protected $sudoku; public function __construct(array $sudoku) { $this->sudoku = $sudoku; } public function print() { foreach ($this->sudoku as $column) { foreach ($column as $cell) { echo "|"; if (null !== $cell) { echo $cell; } else { echo " "; } } echo "|\n"; } } protected function checkConsistenz() { } protected function checkRow($rowIndex) { } } $sudoku = array(); $sudoku[] = array(null,3,null, null,null,null, null,null,null); $sudoku[] = array(null,null,null, 1,9,5, null,null,null); $sudoku[] = array(null,null,8, null,null,null, null,6,null); $sudoku[] = array(8,null,null, null,6,null, null,null,null); $sudoku[] = array(4,null,null, 8,null,null, null,null,1); $sudoku[] = array(null,null,null ,null,2,null, null,null,null); $sudoku[] = array(null,6,null, null,null,null, 2,8,null); $sudoku[] = array(null,null,null, 4,1,9, null,null,5); $sudoku[] = array(null,null,null, null,null,null, null,7,null); $sudokuSolver = new SudokuSolver($sudoko); $sudokuSolver->print();

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).
Note: hhvm uses a JIT which only kicks in after a few runs. Since we run scripts only once, hhvm always runs slower.

VersionSystem time (s)User time (s)Memory (MiB)
7.3.0rc40.0150.00498.97
7.3.0rc30.0090.00416.26
7.3.0beta10.0030.00712.73
7.3.0alpha10.0000.00612.72
7.2.60.0070.00316.86
7.1.200.0030.00915.64
7.1.100.2190.00715.89
7.1.70.0030.00916.98
7.1.60.0080.00316.98
7.1.50.0000.02016.95
7.1.40.0090.00616.55
7.1.30.0000.01316.64
7.1.20.0060.00816.82
7.1.10.0000.00816.67
7.1.00.0000.00816.62
7.0.200.0050.00316.63
7.0.190.0030.01216.76
7.0.180.0030.01016.32
7.0.170.0060.00616.26
7.0.160.0030.00616.25
7.0.150.0060.00916.10
7.0.140.0000.01116.45
7.0.130.0100.00016.68
7.0.120.0030.00616.60
7.0.110.0040.00416.32
7.0.100.0030.00516.62
7.0.90.0030.00516.20
7.0.80.0050.00316.53
7.0.70.0030.00616.36
7.0.60.0040.00416.28
7.0.50.0030.00616.56
7.0.40.0050.00515.30
7.0.30.0030.00515.30
7.0.20.0030.00715.30
7.0.10.0040.00415.30
7.0.00.0070.00015.30
hhvm-3.17.30.0200.09993.03
hhvm-3.15.40.0300.14492.85
hhvm-3.13.20.0380.083100.40
hhvm-3.12.140.0530.093100.39
hhvm-3.11.10.0460.09892.46
hhvm-3.10.10.0400.09889.07
5.6.300.0070.06020.79
5.6.290.0030.06120.86
5.6.280.0100.08021.07
5.6.270.0060.03821.09
5.6.260.0040.04620.87
5.6.250.0260.04021.07
5.6.240.0030.04521.07
5.6.230.0030.04120.97
5.6.220.0070.03720.90
5.6.210.0070.04120.63
5.6.200.0000.05020.96
5.6.190.0000.04620.82
5.6.180.0070.03820.93
5.6.170.0030.04020.79
5.6.160.0000.04721.03
5.6.150.0070.04121.04
5.6.140.0030.04420.79
5.6.130.0030.04320.83
5.6.120.0070.08320.79
5.6.110.0030.04320.90
5.6.100.0000.05721.04
5.6.90.0000.05920.91
5.6.80.0030.08120.40
5.6.70.0070.03720.23
5.6.60.0100.05120.13
5.6.50.0000.04020.21
5.6.40.0190.03220.39
5.6.30.0140.07820.21
5.6.20.0000.04920.40
5.6.10.0060.04220.20
5.6.00.0040.04420.36
5.5.380.0040.04017.54
5.5.370.0000.04217.68
5.5.360.0000.04917.47
5.5.350.0070.03717.53
5.5.340.0070.03718.06
5.5.330.0000.05118.09
5.5.320.0040.04318.09
5.5.310.0070.05218.09
5.5.300.0030.04217.88
5.5.290.0030.04618.03
5.5.280.0060.05318.12
5.5.270.0000.07718.12
5.5.260.0130.03918.11
5.5.250.0030.04517.90
5.5.240.0090.03617.15
5.5.230.0000.04217.47
5.5.220.0000.04817.12
5.5.210.0060.03517.40
5.5.200.0030.04017.10
5.5.190.0030.04717.21
5.5.180.0100.04117.38
5.5.160.0030.04217.19
5.5.150.0070.04517.09
5.5.140.0000.04417.35
5.5.130.0090.03417.44
5.5.120.0070.04617.44
5.5.110.0030.03917.34
5.5.100.0060.03517.10
5.5.90.0060.04017.25
5.5.80.0000.04817.34
5.5.70.0070.03817.37
5.5.60.0070.03917.03
5.5.50.0060.03817.34
5.5.40.0000.04316.98
5.5.30.0040.04017.26
5.5.20.0100.04217.26
5.5.10.0030.04017.33
5.5.00.0040.03917.00
5.4.450.0030.04219.54
5.4.440.0070.04319.44
5.4.430.0000.07819.39
5.4.420.0060.04219.53
5.4.410.0000.04119.20
5.4.400.0090.03118.93
5.4.390.0060.03519.05
5.4.380.0060.03919.21
5.4.370.0040.03919.06
5.4.360.0060.06819.26
5.4.350.0030.04019.23
5.4.340.0070.04719.13
5.4.320.0030.04118.96
5.4.310.0000.04319.08
5.4.300.0030.04719.11
5.4.290.0040.03918.96
5.4.280.0100.03819.16
5.4.270.0100.03719.06
5.4.260.0070.03919.13
5.4.250.0100.03519.13
5.4.240.0100.03819.04
5.4.230.0040.04019.13
5.4.220.0090.03719.05
5.4.210.0140.03818.96
5.4.200.0000.04719.12
5.4.190.0040.04219.07
5.4.180.0000.04218.96
5.4.170.0070.06018.96
5.4.160.0060.03818.93
5.4.150.0030.04319.04
5.4.140.0130.03516.68
5.4.130.0030.03616.77
5.4.120.0040.03916.67
5.4.110.0000.04116.48
5.4.100.0000.03716.73
5.4.90.0000.03716.81
5.4.80.0030.03916.57
5.4.70.0030.04216.73
5.4.60.0090.04416.56
5.4.50.0000.07216.61
5.4.40.0000.03816.80
5.4.30.0030.04016.74
5.4.20.0030.05716.60
5.4.10.0100.03616.73
5.4.00.0030.03515.91
5.3.290.0030.04515.30
5.3.280.0030.04415.30
5.3.270.0140.03115.30
5.3.260.0100.03315.30
5.3.250.0030.04015.30
5.3.240.0030.03915.30
5.3.230.0100.03215.30
5.3.220.0030.03815.30
5.3.210.0070.03315.30
5.3.200.0070.03915.30
5.3.190.0030.03615.30
5.3.180.0060.03915.30
5.3.170.0100.05015.30
5.3.160.0070.03215.30
5.3.150.0030.04315.30
5.3.140.0000.04415.30
5.3.130.0060.05115.30
5.3.120.0030.06515.30
5.3.110.0060.03615.30
5.3.100.0000.04015.30
5.3.90.0030.03915.30
5.3.80.0090.03015.30
5.3.70.0030.03615.30
5.3.60.0090.02815.30
5.3.50.0030.03415.30
5.3.40.0280.03715.30
5.3.30.0060.03815.30
5.3.20.0030.03315.30
5.3.10.0000.04115.30
5.3.00.0000.03915.30
5.2.170.0000.03115.30
5.2.160.0000.04115.30
5.2.150.0000.03715.30
5.2.140.0160.02515.30
5.2.130.0070.02315.30
5.2.120.0030.03215.30
5.2.110.0000.03315.30
5.2.100.0030.02915.30
5.2.90.0030.02915.30
5.2.80.0060.02915.30
5.2.70.0030.02815.30
5.2.60.0030.02815.30
5.2.50.0030.02815.30
5.2.40.0070.02615.30
5.2.30.0000.03215.30
5.2.20.0000.03115.30
5.2.10.0000.03015.30
5.2.00.0030.02615.30
5.1.60.0030.03515.30
5.1.50.0100.02615.30
5.1.40.0030.04115.30
5.1.30.0000.03815.30
5.1.20.0000.03015.30
5.1.10.0070.02115.30
5.1.00.0000.02915.30
5.0.50.0000.02415.30
5.0.40.0030.02615.30
5.0.30.0100.04315.30
5.0.20.0030.02015.30
5.0.10.0000.02315.30
5.0.00.0040.02815.30
4.4.90.0030.01315.30
4.4.80.0040.01515.30
4.4.70.0000.01915.30
4.4.60.0000.01615.30
4.4.50.0000.02115.30
4.4.40.0030.02815.30
4.4.30.0030.01415.30
4.4.20.0000.01715.30
4.4.10.0000.01915.30
4.4.00.0030.02315.30
4.3.110.0030.01815.30
4.3.100.0030.01415.30
4.3.90.0000.01615.30
4.3.80.0030.02415.30
4.3.70.0030.01315.30
4.3.60.0040.01415.30
4.3.50.0000.02015.30
4.3.40.0030.02315.30
4.3.30.0000.02015.30
4.3.20.0000.01815.30
4.3.10.0000.01815.30
4.3.00.0040.01815.30