3v4l.org

run code in 300+ PHP versions simultaneously
<?php class User { public string $name = ""; public string $password = ""; public int $admin = 0; public string $fullName = ""; public function __construct(string $name, string $password, int $admin) { $this->name = $name; $this->password= $password; $this->admin = $admin; } public function __wakeup() { $this->fullName = $this->name . $this->password; } } $user_test = new User("Sebastian", "Password", 1); var_dump($user_test); var_dump(serialize($user_test)); $other_user = unserialize('O:4:"User":3:{s:4:"name";s:9:"Sebastian";s:8:"password";s:8:"Password";s:5:"admin";i:2;}'); var_dump($other_user);

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.70.0110.01118.43
8.3.60.0070.01118.43
8.3.50.0140.00718.27
8.3.40.0100.01018.78
8.3.30.0110.00418.86
8.3.20.0070.00024.18
8.3.10.0080.00024.66
8.3.00.0000.00726.16
8.2.180.0140.00725.92
8.2.170.0140.00719.08
8.2.160.0070.01322.96
8.2.150.0040.00425.66
8.2.140.0050.00324.66
8.2.130.0070.00026.16
8.2.120.0040.00426.16
8.2.110.0060.00322.13
8.2.100.0100.00017.59
8.2.90.0050.00319.11
8.2.80.0030.00517.97
8.2.70.0030.00617.38
8.2.60.0040.00417.91
8.2.50.0040.00818.07
8.2.40.0060.00319.95
8.2.30.0040.00418.00
8.2.20.0000.00718.04
8.2.10.0000.00719.21
8.2.00.0030.00519.13
8.1.280.0070.01425.92
8.1.270.0080.00022.19
8.1.260.0080.00026.35
8.1.250.0080.00028.09
8.1.240.0060.00323.79
8.1.230.0040.00822.77
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0030.00617.35
8.1.190.0050.00317.35
8.1.180.0040.00418.10
8.1.170.0040.00418.64
8.1.160.0110.00019.09
8.1.150.0020.00518.87
8.1.140.0000.00720.55
8.1.130.0000.00820.18
8.1.120.0000.00717.51
8.1.110.0000.00717.43
8.1.100.0000.00817.46
8.1.90.0040.00417.48
8.1.80.0040.00417.52
8.1.70.0080.00017.34
8.1.60.0040.00417.52
8.1.50.0040.00417.56
8.1.40.0050.00317.43
8.1.30.0000.00817.70
8.1.20.0040.00417.50
8.1.10.0000.00817.53
8.1.00.0040.00417.49
8.0.300.0000.00718.77
8.0.290.0040.00416.75
8.0.280.0030.00318.59
8.0.270.0030.00318.14
8.0.260.0030.00318.64
8.0.250.0000.00717.02
8.0.240.0040.00417.00
8.0.230.0000.00717.08
8.0.220.0000.00716.95
8.0.210.0000.00816.99
8.0.200.0000.00616.96
8.0.190.0000.00717.04
8.0.180.0000.00817.02
8.0.170.0090.00017.02
8.0.160.0000.00916.88
8.0.150.0000.00716.90
8.0.140.0040.00416.86
8.0.130.0060.00013.46
8.0.120.0090.00016.98
8.0.110.0040.00416.98
8.0.100.0040.00417.01
8.0.90.0000.00816.87
8.0.80.0030.01216.98
8.0.70.0050.00216.93
8.0.60.0040.00416.85
8.0.50.0000.00817.09
8.0.30.0250.00916.78
8.0.20.0270.00816.96
8.0.10.0270.01116.86
8.0.00.0180.01316.90
7.4.330.0000.00415.55
7.4.320.0030.00316.52
7.4.300.0060.00016.56
7.4.290.0030.00616.59
7.4.280.0090.00016.67
7.4.270.0000.01116.63
7.4.260.0000.00513.30
7.4.250.0000.00716.57
7.4.240.0020.00516.58
7.4.230.0000.00916.65
7.4.220.0000.00716.36
7.4.210.0110.00316.49
7.4.200.0000.00716.42
7.4.160.0100.01116.38
7.4.150.0260.00716.39
7.4.140.0270.00316.31
7.4.130.0250.01216.31
7.4.120.0300.01816.33
7.4.110.0270.00716.40
7.4.100.0220.01116.38
7.4.90.0280.00716.45
7.4.80.0270.00716.34
7.4.70.0270.00616.50
7.4.60.0200.01116.31
7.4.50.0250.00716.32
7.4.40.0200.00916.43
7.4.30.0230.01316.58
7.4.20.0250.01016.42
7.4.10.0190.01116.48
7.4.00.0290.00816.43
7.3.330.0000.00716.23
7.3.320.0000.00613.23
7.3.310.0030.00416.23
7.3.300.0030.00316.17
7.3.290.0090.00916.19
7.3.280.0270.00516.01
7.3.270.0240.01116.13
7.3.260.0210.01216.11
7.3.250.0210.00616.12
7.3.240.0240.00916.04
7.3.230.0290.01216.11
7.3.220.0250.00616.00
7.3.210.0260.01016.07
7.3.200.0210.01115.96
7.3.190.0270.00715.99
7.3.180.0230.01316.07
7.3.170.0300.00315.98
7.3.160.0280.00716.05
7.3.150.0170.01716.03
7.3.140.0310.00316.05
7.3.130.0170.01716.00
7.3.120.0210.01616.07
7.3.110.0230.00415.91
7.3.100.0310.00015.90
7.3.90.0170.01216.30
7.3.80.0190.01315.98
7.3.70.0310.00616.11
7.3.60.0360.00516.17
7.3.50.0190.01316.11
7.3.40.0270.00616.07
7.3.30.0180.01216.18
7.3.20.0290.00816.12
7.3.10.0220.01315.98
7.3.00.0240.00716.12

preferences:
41.75 ms | 400 KiB | 5 Q