3v4l.org

run code in 500+ PHP versions simultaneously
<?php trait Singleton { # Holds Parent Instance private static $_instance; # Holds Reference To zVal protected $_args; # Create The Instance protected function __construct() {} # Static Call To Get Instance public static function getInstance() { return self::$_instance ?? (self::$_instance = new self()); } # Bind zVal Of Passed Reference To Index protected function _bindParam(&$val) { $this->_arg = &$val; return $this; } } abstract class Model { abstract public function save(); # Set your DB up here } class MyModel extends Model { use \Singleton { _bindParam as public bindParam; } public function save() { print_r($this->_arg); } } MyModel::getInstance()->bindParam($row); foreach([['A', 'B', 'C'], ['D', 'E', 'F'], ['G', 'H', 'I']] as $key => $row) { $row[0] = 'Changed'; MyModel::getInstance()->save(); }

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.5.90.0090.00816.86
8.5.80.0110.01016.91
8.5.70.0070.01016.98
8.5.60.0050.00317.11
8.5.50.0060.01116.75
8.5.30.0080.00819.48
8.5.20.0110.00821.36
8.5.10.0130.00616.93
8.5.00.0100.01120.21
8.4.240.0120.00919.82
8.4.230.0150.00822.27
8.4.220.0040.00619.55
8.4.210.0190.00619.66
8.4.180.0150.00719.77
8.4.170.0160.00623.95
8.4.160.0120.01123.17
8.4.150.0090.00316.92
8.4.140.0110.00917.47
8.4.130.0040.00517.88
8.4.120.0100.01020.64
8.4.110.0030.00622.59
8.4.100.0120.00918.06
8.4.90.0050.00518.70
8.4.80.0070.00518.14
8.4.70.0060.00317.94
8.4.60.0080.01120.41
8.4.50.0130.00322.46
8.4.40.0100.01019.55
8.4.30.0060.01322.21
8.4.20.0180.00320.48
8.4.10.0090.00017.78
8.3.330.0150.00618.65
8.3.320.0090.01118.49
8.3.310.0120.00818.61
8.3.300.0120.00819.24
8.3.290.0110.00920.86
8.3.280.0110.01118.66
8.3.270.0120.00716.85
8.3.260.0130.00816.76
8.3.250.0050.00420.91
8.3.240.0110.00616.75
8.3.230.0110.01116.60
8.3.220.0110.00717.05
8.3.210.0150.00516.86
8.3.200.0130.00616.69
8.3.190.0150.00416.99
8.3.180.0030.00616.70
8.3.170.0090.00916.64
8.3.160.0140.00317.20
8.3.150.0040.00717.41
8.3.140.0070.01119.18
8.3.130.0000.00718.58
8.3.120.0060.00318.80
8.3.110.0090.00620.94
8.3.100.0070.01424.06
8.3.90.0040.00426.77
8.3.80.0030.00717.97
8.3.70.0140.00018.68
8.3.60.0100.00618.54
8.3.50.0060.01117.24
8.3.40.0120.00618.75
8.3.30.0120.00318.88
8.3.20.0040.00422.08
8.3.10.0110.00423.64
8.3.00.0040.00420.90
8.2.320.0090.00918.23
8.2.310.0100.00918.16
8.2.300.0100.01120.46
8.2.290.0060.00320.78
8.2.280.0100.00821.90
8.2.270.0070.01117.29
8.2.260.0000.00816.88
8.2.250.0040.00418.62
8.2.240.0120.00817.11
8.2.230.0080.00022.58
8.2.220.0000.01037.54
8.2.210.0090.00926.77
8.2.200.0030.00618.28
8.2.190.0130.01016.58
8.2.180.0040.01516.63
8.2.170.0090.00622.96
8.2.160.0000.01420.04
8.2.150.0000.00824.18
8.2.140.0110.00724.66
8.2.130.0030.00526.16
8.2.120.0050.00319.68
8.2.110.0030.00621.05
8.2.100.0040.00817.84
8.2.90.0060.00318.34
8.2.80.0000.00817.97
8.2.70.0000.00817.93
8.2.60.0030.00618.12
8.2.50.0000.00818.10
8.2.40.0070.00019.34
8.2.30.0000.00719.21
8.2.20.0000.00718.14
8.2.10.0000.00819.38
8.2.00.0040.00419.45
8.1.340.0090.01217.64
8.1.330.0140.00521.88
8.1.320.0110.00816.30
8.1.310.0080.00016.15
8.1.300.0120.00619.98
8.1.290.0030.00930.84
8.1.280.0000.01425.92
8.1.270.0050.00518.95
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0050.00520.69
8.1.230.0090.00320.91
8.1.220.0090.00017.74
8.1.210.0090.00018.89
8.1.200.0060.00317.35
8.1.190.0040.00417.36
8.1.180.0110.00019.19
8.1.170.0030.00518.64
8.1.160.0040.00418.89
8.1.150.0050.00318.95
8.1.140.0000.00720.79
8.1.130.0000.00720.22
8.1.120.0040.00417.45
8.1.110.0060.00317.48
8.1.100.0050.00317.53
8.1.90.0040.00417.48
8.1.80.0000.00717.53
8.1.70.0000.00717.49
8.1.60.0030.00617.56
8.1.50.0000.00817.54
8.1.40.0040.00417.44
8.1.30.0060.00317.67
8.1.20.0040.00417.54
8.1.10.0000.00717.59
8.1.00.0040.00417.52
8.0.300.0040.00420.04
8.0.290.0000.00816.63
8.0.280.0070.00018.46
8.0.270.0000.00717.15
8.0.260.0040.00418.34
8.0.250.0000.00717.03
8.0.240.0030.00317.00
8.0.230.0000.00716.95
8.0.220.0030.00516.95
8.0.210.0000.00716.95
8.0.200.0030.00317.00
8.0.190.0080.00016.96
8.0.180.0000.00816.99
8.0.170.0030.00616.96
8.0.160.0000.00716.84
8.0.150.0000.00716.80
8.0.140.0000.00716.90
8.0.130.0000.00713.33
8.0.120.0080.00016.83
8.0.110.0000.00716.89
8.0.100.0000.00716.98
8.0.90.0000.00716.86
8.0.80.0070.00916.88
8.0.70.0050.00316.94
8.0.60.0040.00416.95
8.0.50.0040.00416.80
8.0.30.0120.00716.99
8.0.20.0060.01317.29
8.0.10.0040.00416.94
8.0.00.0100.00816.95
7.4.330.0060.00015.55
7.4.320.0000.00616.54
7.4.300.0030.00316.52
7.4.290.0000.00716.52
7.4.280.0040.00416.50
7.4.270.0030.00316.54
7.4.260.0020.00516.48
7.4.250.0050.00316.48
7.4.240.0040.00416.61
7.4.230.0000.00716.51
7.4.220.0000.00816.66
7.4.210.0110.00516.61
7.4.200.0040.00416.65
7.4.160.0070.00816.44
7.4.140.0090.00817.86
7.4.130.0100.00616.59
7.4.120.0090.00916.61
7.4.110.0090.00916.50
7.4.100.0130.00616.47
7.4.90.0000.01816.66
7.4.80.0150.00619.39
7.4.70.0130.00416.51
7.4.60.0060.00916.57
7.4.50.0070.00716.55
7.4.40.0080.00916.30
7.4.00.0060.01115.15
7.3.330.0030.00313.26
7.3.320.0000.00613.30
7.3.310.0000.00716.28
7.3.300.0030.00316.32
7.3.290.0040.00416.25
7.3.280.0070.01316.36
7.3.260.0070.01216.45
7.3.240.0090.00816.38
7.3.230.0070.01016.43
7.3.210.0070.01016.23
7.3.200.0060.01016.33
7.3.190.0130.00616.62
7.3.180.0070.01016.45
7.3.170.0090.00916.59
7.3.160.0120.00316.26
7.3.120.0100.00614.90
7.3.110.0030.01014.68
7.3.100.0110.00415.02
7.3.90.0060.00615.07
7.3.80.0090.00614.97
7.3.70.0110.00415.00
7.3.60.0040.00814.86
7.3.50.0100.00715.04
7.3.40.0080.00414.54
7.3.30.0060.00914.54
7.3.20.0060.00916.73
7.3.10.0410.01015.62
7.3.00.0480.00315.73
7.2.330.0110.00816.86
7.2.320.0140.00716.76
7.2.310.0060.01216.70
7.2.300.0130.00416.87
7.2.290.0060.01216.86
7.2.250.0060.01214.93
7.2.240.0070.01415.25
7.2.230.0030.00915.08
7.2.220.0030.00615.02
7.2.210.0060.00615.01
7.2.200.0070.01114.85
7.2.190.0070.00715.04
7.2.180.0000.01115.23
7.2.170.0040.01114.77
7.2.130.0870.00315.34
7.2.120.1790.00715.18
7.2.110.1210.00015.25
7.2.100.1000.00315.06
7.2.90.1350.00715.07
7.2.80.0870.00714.94
7.2.70.0900.01015.20
7.2.60.0770.00014.98
7.2.50.0850.01314.96
7.2.40.1350.01015.08
7.2.30.0650.01015.11
7.2.20.1110.01015.14
7.2.10.1080.01015.39
7.2.00.1340.01015.02
7.1.330.0070.00715.80
7.1.320.0060.00315.55
7.1.310.0040.01115.50
7.1.300.0050.00515.91
7.1.290.0030.00915.87
7.1.280.0070.00715.97
7.1.270.0060.00915.74
7.1.260.0070.00315.61
7.1.250.1010.00713.98

preferences:
47.97 ms | 1590 KiB | 5 Q