3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Connection { private $server, $username, $password, $db; public function __construct($server, $username, $password, $db) { $this->server = $server; $this->username = $username; $this->password = $password; $this->db = $db; } public function __sleep() { return array('server', 'username', 'password', 'db'); } public function a(){ var_dump( $server); echo $username; echo $password; echo $db; } } $conect= new Connection('server1', 'username1', 'password1', 'db1'); $connect->a('server', 'username', 'password', 'db'); ?>

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.0040.01118.56
8.3.50.0150.00522.06
8.3.40.0070.00718.77
8.3.30.0070.00719.04
8.3.20.0080.00020.25
8.3.10.0050.00323.50
8.3.00.0000.00820.94
8.2.180.0120.00316.38
8.2.170.0040.01122.96
8.2.160.0120.00320.30
8.2.150.0040.00424.18
8.2.140.0070.00024.66
8.2.130.0100.01026.16
8.2.120.0000.00820.91
8.2.110.0100.00019.30
8.2.100.0040.00717.91
8.2.90.0060.00319.05
8.2.80.0030.00517.97
8.2.70.0000.00817.63
8.2.60.0050.00317.93
8.2.50.0090.00018.07
8.2.40.0040.00418.03
8.2.30.0060.00318.07
8.2.20.0080.00017.67
8.2.10.0050.00318.01
8.2.00.0000.00717.67
8.1.280.0030.01025.92
8.1.270.0040.00422.09
8.1.260.0000.00826.35
8.1.250.0030.00528.09
8.1.240.0040.00420.85
8.1.230.0070.00417.42
8.1.220.0000.00817.74
8.1.210.0080.00018.77
8.1.200.0000.00917.13
8.1.190.0000.00817.22
8.1.180.0050.00318.10
8.1.170.0030.00518.66
8.1.160.0040.00421.86
8.1.150.0040.00418.54
8.1.140.0000.00717.30
8.1.130.0030.00317.84
8.1.120.0000.00817.37
8.1.110.0030.00517.37
8.1.100.0000.00817.41
8.1.90.0030.00317.32
8.1.80.0000.00717.36
8.1.70.0070.00017.30
8.1.60.0050.00317.48
8.1.50.0000.00817.55
8.1.40.0000.00817.47
8.1.30.0040.00717.61
8.1.20.0040.00417.48
8.1.10.0030.00617.49
8.1.00.0000.00817.47
8.0.300.0000.01218.77
8.0.290.0040.00416.63
8.0.280.0030.00318.44
8.0.270.0030.00517.20
8.0.260.0000.00617.20
8.0.250.0030.00316.91
8.0.240.0040.00416.90
8.0.230.0000.00717.02
8.0.220.0030.00316.77
8.0.210.0030.00316.93
8.0.200.0060.00016.89
8.0.190.0000.00816.85
8.0.180.0070.00016.96
8.0.170.0080.00016.94
8.0.160.0000.00717.00
8.0.150.0040.00416.93
8.0.140.0000.00716.76
8.0.130.0060.00013.40
8.0.120.0000.00816.77
8.0.110.0040.00416.82
8.0.100.0040.00416.83
8.0.90.0030.00517.01
8.0.80.0060.00916.87
8.0.70.0040.00416.95
8.0.60.0070.00016.85
8.0.50.0000.00716.85
8.0.30.0120.00717.01
8.0.20.0130.00817.40
8.0.10.0040.00416.82
8.0.00.0060.01016.62
7.4.330.0000.00515.08
7.4.320.0030.00316.55
7.4.300.0040.00416.43
7.4.290.0030.00516.52
7.4.280.0000.00716.55
7.4.270.0000.00816.60
7.4.260.0030.00616.48
7.4.250.0000.00716.39
7.4.240.0000.00716.48
7.4.230.0030.00316.59
7.4.220.0060.01016.61
7.4.210.0030.01316.61
7.4.200.0000.00716.60
7.4.160.0070.00716.48
7.4.150.0110.00717.40
7.4.140.0100.01017.86
7.4.130.0090.01116.51
7.4.120.0080.00816.50
7.4.110.0160.00616.45
7.4.100.0100.01016.36
7.4.90.0140.00416.39
7.4.80.0070.01419.39
7.4.70.0030.01416.54
7.4.60.0070.01016.41
7.4.50.0000.00716.48
7.4.40.0090.00616.37
7.4.30.0090.00616.38
7.4.00.0030.01014.60
7.3.330.0000.00513.39
7.3.320.0050.00013.37
7.3.310.0070.00016.27
7.3.300.0040.00416.38
7.3.290.0070.00716.42
7.3.280.0080.00916.35
7.3.270.0130.00617.40
7.3.260.0100.00716.34
7.3.250.0070.01016.31
7.3.240.0030.01416.29
7.3.230.0070.01116.45
7.3.210.0180.00016.57
7.3.200.0060.00919.39
7.3.190.0100.00716.41
7.3.180.0040.01216.44
7.3.170.0080.00816.50
7.3.160.0130.00316.30
7.3.120.0030.00914.66
7.2.330.0070.01016.74
7.2.320.0090.00916.64
7.2.310.0130.00616.36
7.2.300.0060.01016.48
7.2.290.0110.00716.59
7.2.60.0080.00417.03
7.2.00.0030.00719.26
7.1.200.0070.00315.57
7.1.100.0040.00717.73
7.1.70.0000.00716.68
7.1.60.0000.02419.70
7.1.50.0150.01216.87
7.1.00.0000.08022.44
7.0.200.0030.00716.26
7.0.140.0030.07322.09
7.0.70.0030.05721.93
7.0.60.0000.06321.71
7.0.50.0030.07022.11
7.0.40.0100.04720.05
7.0.30.0030.07720.04
7.0.20.0030.07020.00
7.0.10.0000.07720.09
7.0.00.0030.06320.14
5.6.280.0030.07321.14
5.6.220.0030.08020.50
5.6.210.0030.08720.61
5.6.200.0000.06320.96
5.6.190.0030.04021.12
5.6.180.0030.06721.11
5.6.170.0130.07321.01
5.6.160.0070.06721.05
5.6.150.0030.07021.05
5.6.140.0070.08321.03
5.6.130.0030.09021.17
5.6.120.0070.03720.93
5.6.110.0000.04721.16
5.6.100.0070.08321.03
5.6.90.0030.04021.15
5.6.80.0030.03020.53
5.6.70.0070.04720.44
5.6.60.0030.05020.40
5.6.50.0070.03720.48
5.6.40.0030.06320.54
5.6.30.0000.05320.33
5.6.20.0030.03720.44
5.6.10.0000.04020.47
5.6.00.0070.05720.39
5.5.360.0100.07320.34
5.5.350.0030.04320.40
5.5.340.0030.09020.78
5.5.330.0100.07720.82
5.5.320.0030.08720.85
5.5.310.0070.08320.64
5.5.300.0000.06720.84
5.5.290.0070.08020.80
5.5.280.0000.04320.77
5.5.270.0130.04020.92
5.5.260.0030.04020.82
5.5.250.0000.04320.71
5.5.240.0000.03320.30
5.5.230.0070.06320.12
5.5.220.0100.07020.26
5.5.210.0000.07720.23
5.5.200.0000.04020.01
5.5.190.0030.03720.13
5.5.180.0070.03320.15
5.5.160.0000.04320.24
5.5.150.0000.04320.08
5.5.140.0030.03719.98
5.5.130.0030.03720.21
5.5.120.0000.04020.13
5.5.110.0030.05720.27
5.5.100.0000.04019.95
5.5.90.0030.05020.07
5.5.80.0000.04020.08
5.5.70.0030.03720.07
5.5.60.0030.03019.97
5.5.50.0070.03720.16
5.5.40.0030.03020.12
5.5.30.0030.03720.05
5.5.20.0000.03320.00
5.5.10.0070.02719.98
5.5.00.0000.05320.08
5.4.450.0000.08019.49
5.4.440.0000.04019.37
5.4.430.0000.05719.44
5.4.420.0030.05019.17
5.4.410.0070.03319.42
5.4.400.0030.03318.88
5.4.390.0000.03319.07
5.4.380.0030.07718.85
5.4.370.0070.05019.20
5.4.360.0000.05719.10
5.4.350.0030.07019.16
5.4.340.0000.04319.13
5.4.320.0070.03718.90
5.4.310.0030.03719.18
5.4.300.0100.03019.04
5.4.290.0030.03718.87
5.4.280.0070.03319.15
5.4.270.0000.04719.02
5.4.260.0030.03719.02
5.4.250.0030.03718.84
5.4.240.0030.02719.17
5.4.230.0000.03719.11
5.4.220.0070.05019.03
5.4.210.0030.03019.04
5.4.200.0030.03718.84
5.4.190.0030.04318.95
5.4.180.0070.02718.86
5.4.170.0030.02718.89
5.4.160.0030.03018.95
5.4.150.0030.03719.19
5.4.140.0070.04016.46
5.4.130.0030.03316.41
5.4.120.0000.03316.46
5.4.110.0030.03316.33
5.4.100.0000.04016.39
5.4.90.0030.07016.50
5.4.80.0000.05316.32
5.4.70.0000.05016.30
5.4.60.0070.05016.32
5.4.50.0030.07016.36
5.4.40.0030.06716.52
5.4.30.0100.07016.36
5.4.20.0030.05716.47
5.4.10.0030.05316.36
5.4.00.0070.07015.79
5.3.290.0030.03714.79
5.3.280.0000.03714.57
5.3.270.0000.04014.74
5.3.260.0030.06714.57
5.3.250.0000.06014.63
5.3.240.0000.03714.60
5.3.230.0000.03714.63
5.3.220.0000.03014.50
5.3.210.0030.04014.69
5.3.200.0030.04714.59
5.3.190.0070.05714.64
5.3.180.0030.07014.59
5.3.170.0100.06714.53
5.3.160.0070.04014.55
5.3.150.0000.07014.55
5.3.140.0000.05714.58
5.3.130.0000.07314.50
5.3.120.0000.09014.58
5.3.110.0030.06714.52
5.3.100.0030.07014.05
5.3.90.0000.07314.15
5.3.80.0070.07014.13
5.3.70.0000.07714.05
5.3.60.0030.07314.07
5.3.50.0000.07314.04
5.3.40.0000.04013.84
5.3.30.0030.06713.84
5.3.20.0070.05313.82
5.3.10.0030.06313.55
5.3.00.0070.07313.63
5.2.170.0000.06312.34
5.2.160.0030.06012.34
5.2.150.0000.06712.34
5.2.140.0030.06312.34
5.2.130.0000.06012.34
5.2.120.0030.06312.34
5.2.110.0000.04012.34
5.2.100.0030.06312.34
5.2.90.0030.06312.34
5.2.80.0070.06012.34
5.2.70.0030.06012.34
5.2.60.0030.06012.34
5.2.50.0030.06712.34
5.2.40.0000.06012.34
5.2.30.0030.05312.34
5.2.20.0070.04012.34
5.2.10.0030.05012.34
5.2.00.0070.06012.34
5.1.60.0030.04312.34
5.1.50.0030.04012.34
5.1.40.0030.05012.34
5.1.30.0000.05012.34
5.1.20.0030.05312.34
5.1.10.0030.04712.34
5.1.00.0100.04712.34
5.0.50.0000.04712.34
5.0.40.0030.04312.34
5.0.30.0030.06712.34
5.0.20.0070.03712.34
5.0.10.0030.04312.34
5.0.00.0030.06312.34
4.4.90.0030.03712.34
4.4.80.0000.03712.34
4.4.70.0000.04012.34
4.4.60.0030.02712.34
4.4.50.0000.03712.34
4.4.40.0000.05712.34
4.4.30.0000.04012.34
4.4.20.0030.03312.34
4.4.10.0070.03012.34
4.4.00.0070.05012.34
4.3.110.0030.03712.34
4.3.100.0030.03312.34
4.3.90.0030.03312.34
4.3.80.0030.04012.34
4.3.70.0030.03012.34
4.3.60.0000.03712.34
4.3.50.0030.03312.34
4.3.40.0030.04312.34
4.3.30.0000.03312.34
4.3.20.0030.03712.34
4.3.10.0000.03312.34
4.3.00.0030.02712.34

preferences:
44.09 ms | 400 KiB | 5 Q