3v4l.org

run code in 300+ PHP versions simultaneously
<?php $PDO = new PDO('sqlite::memory:', null, null, [PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION]); $PDO->exec('create table users(name text)'); $PDO->exec("insert into users values('alice'), ('bob')"); $user = $PDO->query('select name from users limit 1')->fetchObject(User::class); echo "Hello, {$user->getName()}!"; class User { protected $name; public function getName() : string { return $this->name; } }

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.0100.00617.38
8.3.60.0060.00917.38
8.3.50.0210.01122.40
8.3.40.0090.00619.58
8.3.30.0070.00719.57
8.3.20.0080.00019.98
8.3.10.0040.00422.68
8.3.00.0090.00020.26
8.2.180.0070.01417.38
8.2.170.0130.00322.96
8.2.160.0080.00620.13
8.2.150.0000.00824.18
8.2.140.0050.00324.66
8.2.130.0040.00420.07
8.2.120.0040.00426.35
8.2.110.0030.00723.07
8.2.100.0080.00818.34
8.2.90.0000.00818.50
8.2.80.0040.00418.13
8.2.70.0030.00618.68
8.2.60.0040.00418.91
8.2.50.0060.00318.13
8.2.40.0050.00321.30
8.2.30.0040.00419.96
8.2.20.0030.00518.84
8.2.10.0050.00318.94
8.2.00.0080.00018.46
8.1.280.0100.01025.92
8.1.270.0000.00822.80
8.1.260.0080.00026.35
8.1.250.0000.00828.09
8.1.240.0100.00024.60
8.1.230.0000.01119.99
8.1.220.0040.00418.54
8.1.210.0080.00018.77
8.1.200.0060.00317.97
8.1.190.0030.00518.10
8.1.180.0060.00318.15
8.1.170.0050.00319.46
8.1.160.0040.00419.61
8.1.150.0000.00720.95
8.1.140.0030.00520.27
8.1.130.0030.00319.80
8.1.120.0040.00418.13
8.1.110.0000.00818.13
8.1.100.0000.00818.14
8.1.90.0050.00318.14
8.1.80.0050.00318.13
8.1.70.0000.00718.20
8.1.60.0060.00318.39
8.1.50.0040.00418.31
8.1.40.0050.00318.33
8.1.30.0080.00018.56
8.1.20.0050.00318.57
8.1.10.0030.00518.32
8.1.00.0000.00818.34
8.0.300.0040.00418.77
8.0.290.0050.00317.50
8.0.280.0040.00419.22
8.0.270.0050.00218.21
8.0.260.0000.00718.18
8.0.250.0050.00317.77
8.0.240.0000.00717.80
8.0.230.0040.00417.73
8.0.220.0030.00517.74
8.0.210.0040.00417.63
8.0.200.0030.00517.76
8.0.190.0050.00317.75
8.0.180.0000.00817.66
8.0.170.0000.00817.59
8.0.160.0020.00517.74
8.0.150.0040.00417.71
8.0.140.0070.00017.69
8.0.130.0030.00314.14
8.0.120.0040.00417.64
8.0.110.0060.00317.56
8.0.100.0080.00017.72
8.0.90.0030.00517.50
8.0.80.0040.01117.69
8.0.70.0000.00717.49
8.0.60.0000.00817.86
8.0.50.0000.00717.51
8.0.30.0100.00917.84
8.0.20.0110.01117.78
8.0.10.0000.00817.61
8.0.00.0130.01317.47
7.4.330.0050.00015.55
7.4.320.0030.00317.31
7.4.300.0070.00017.27
7.4.290.0070.00017.42
7.4.280.0060.00317.36
7.4.270.0000.00817.42
7.4.260.0030.00617.26
7.4.250.0030.00517.26
7.4.240.0040.00417.39
7.4.230.0000.00817.18
7.4.220.0160.00917.32
7.4.210.0040.01417.24
7.4.200.0070.00017.33
7.4.160.0110.00617.36
7.4.150.0140.00417.40
7.4.140.0100.01117.86
7.4.130.0100.00917.23
7.4.120.0120.00617.35
7.4.110.0100.00717.27
7.4.100.0130.00317.13
7.4.90.0190.00317.34
7.4.80.0120.00919.39
7.4.70.0040.01217.09
7.4.60.0100.00717.42
7.4.50.0090.00617.31
7.4.40.0130.01017.04
7.4.30.0100.01417.41
7.4.00.0060.00615.83
7.3.330.0030.00314.01
7.3.320.0000.00514.05
7.3.310.0000.00717.13
7.3.300.0000.00716.97
7.3.290.0020.00517.09
7.3.280.0100.00817.07
7.3.270.0140.00717.40
7.3.260.0020.01817.23
7.3.250.0120.00917.18
7.3.240.0120.01217.20
7.3.230.0110.00717.19
7.3.210.0040.01417.10
7.3.200.0070.01017.06
7.3.190.0070.01117.32
7.3.180.0080.00817.17
7.3.170.0030.01317.13
7.3.160.0120.01317.26
7.2.330.0100.01017.64
7.2.320.0120.00617.52
7.2.310.0030.01417.52
7.2.300.0060.01717.40
7.2.290.0040.01517.63
7.2.110.0070.01117.23
7.2.60.0000.01517.71
7.2.00.0060.01020.12
7.1.200.0040.01116.25
7.1.100.0060.00618.68
7.1.70.0000.00817.42
7.1.60.0060.00618.15
7.1.50.0150.00017.45
7.1.00.0170.05322.68
7.0.200.0070.01017.34
7.0.140.0130.05722.25
7.0.130.0200.05322.18
7.0.120.0100.05322.04
7.0.110.0230.04722.24
7.0.100.0170.05022.18
7.0.90.0100.05722.07
7.0.80.0100.05322.12
7.0.70.0170.05022.04
7.0.60.0130.06022.15
7.0.50.0230.04322.07
7.0.40.0100.06022.23
7.0.30.0100.06022.21
7.0.20.0070.05722.18
7.0.10.0130.05322.02
7.0.00.0030.06322.09
5.6.290.0000.06720.85
5.6.280.0100.05320.93
5.6.270.0130.05320.93
5.6.260.0070.06021.08
5.6.250.0130.05021.13
5.6.240.0000.06721.12
5.6.230.0070.06320.92
5.6.220.0100.06020.86
5.6.210.0100.05320.94
5.6.200.0170.05021.05
5.6.190.0130.05720.85
5.6.180.0130.05721.00
5.6.170.0130.05320.82
5.6.160.0130.05321.08
5.6.150.0130.07021.03
5.6.140.0030.06320.82
5.6.130.0030.06020.86
5.6.120.0030.06020.97
5.6.110.0100.05721.02
5.6.100.0130.06020.87
5.6.90.0130.05320.98
5.6.80.0130.05020.30
5.6.70.0100.05320.26
5.6.60.0130.05020.43
5.6.50.0100.05020.44
5.6.40.0070.05720.24
5.6.30.0100.05720.44
5.6.20.0130.05320.25
5.6.10.0170.04720.41
5.6.00.0200.05320.43

preferences:
63.32 ms | 401 KiB | 5 Q