3v4l.org

run code in 300+ PHP versions simultaneously
<?php class SqlitePlatform { public static function udfSqrt($value) { return sqrt($value); } } $userDefinedFunctions = [ 'sqrt' => ['callback' => [SqlitePlatform::class, 'udfSqrt'], 'numArgs' => 1], ]; $dsn = "sqlite::memory:"; try { $pdo = new PDO($dsn); foreach ($userDefinedFunctions as $fn => $data) { $pdo->sqliteCreateFunction($fn, $data['callback'], $data['numArgs']); } \var_dump($pdo); } catch (PDOException $e) { \var_dump($e); }

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.130.0090.00018.93
8.3.120.0080.00019.51
8.3.110.0060.00918.61
8.3.100.0070.00418.92
8.3.90.0000.00826.77
8.3.80.0100.00017.25
8.3.70.0090.00917.11
8.3.60.0090.00616.98
8.3.50.0120.00320.63
8.3.40.0030.01020.95
8.3.30.0060.00919.34
8.3.20.0000.00824.18
8.3.10.0080.00024.66
8.3.00.0050.00326.16
8.2.250.0060.01017.00
8.2.240.0000.00817.84
8.2.230.0000.00920.94
8.2.220.0070.00724.06
8.2.210.0080.01126.77
8.2.200.0090.00018.91
8.2.190.0150.00316.99
8.2.180.0040.01425.92
8.2.170.0140.00719.46
8.2.160.0190.00322.96
8.2.150.0090.00025.66
8.2.140.0040.00424.66
8.2.130.0000.00826.16
8.2.120.0030.00520.27
8.2.110.0090.00020.97
8.2.100.0030.00918.59
8.2.90.0080.00018.13
8.2.80.0050.00319.27
8.2.70.0030.00617.88
8.2.60.0060.00318.00
8.2.50.0080.00018.13
8.2.40.0080.00021.63
8.2.30.0050.00518.64
8.2.20.0000.00719.73
8.2.10.0050.00218.63
8.2.00.0040.00419.87
8.1.300.0150.00316.72
8.1.290.0070.00430.84
8.1.280.0100.01325.92
8.1.270.0040.00424.66
8.1.260.0050.00326.35
8.1.250.0070.00028.09
8.1.240.0030.00624.38
8.1.230.0050.00519.60
8.1.220.0030.00619.02
8.1.210.0030.00618.77
8.1.200.0060.00317.38
8.1.190.0060.00617.72
8.1.180.0000.00918.10
8.1.170.0080.00017.63
8.1.160.0000.00819.23
8.1.150.0030.00519.11
8.1.140.0090.00018.00
8.1.130.0040.00421.04
8.1.120.0050.00218.05
8.1.110.0110.00017.91
8.1.100.0120.00017.88
8.1.90.0040.00717.92
8.1.80.0040.00817.89
8.1.70.0070.00417.84
8.1.60.0030.00917.98
8.1.50.0080.00417.99
8.1.40.0110.00018.03
8.1.30.0030.00918.19
8.1.20.0090.00318.09
8.1.10.0120.00417.97
8.1.00.0000.01217.91
8.0.300.0040.00418.77
8.0.290.0000.00817.00
8.0.280.0000.00720.59
8.0.270.0070.00017.16
8.0.260.0030.00318.88
8.0.250.0050.00317.50
8.0.240.0000.00717.42
8.0.230.0140.00017.35
8.0.220.0050.01017.31
8.0.210.0100.00517.39
8.0.200.0100.00517.32
8.0.190.0040.01117.34
8.0.180.0050.01117.36
8.0.170.0120.00417.41
8.0.160.0050.01017.34
8.0.150.0100.00717.29
8.0.140.0150.00017.28
8.0.130.0060.00917.25
8.0.120.0130.00317.34
8.0.110.0120.00317.27
8.0.100.0150.00017.28
8.0.90.0060.00917.25
8.0.80.0120.00417.13
8.0.70.0110.00517.28
8.0.60.0120.00417.29
8.0.50.0060.00617.32
8.0.30.0030.00817.32
8.0.20.0090.00317.47
8.0.10.0100.00617.37
7.4.330.0060.00015.55
7.4.320.0130.00316.96
7.4.300.0120.00617.16
7.4.290.0130.00316.80
7.4.280.0140.00416.82
7.4.270.0140.00316.93
7.4.260.0150.00316.91
7.4.250.0120.00417.07
7.4.240.0140.00216.93
7.4.230.0140.00316.82
7.4.220.0080.00416.90
7.4.210.0120.00416.99
7.4.200.0100.00617.01
7.4.190.0110.00417.16
7.4.180.0050.01117.04
7.4.160.0100.00617.08
7.4.150.0080.00817.08
7.4.140.0140.00016.78
7.4.130.0150.00016.81
7.4.120.0100.00516.74
7.4.110.0050.01017.02
7.4.100.0100.00517.13
7.4.90.0140.00016.99
7.4.80.0120.00316.71
7.4.70.0120.00216.91
7.4.60.0070.00716.72
7.4.50.0100.00616.93
7.4.40.0140.00016.72
7.4.30.0050.01016.68
7.4.20.0080.00416.59
7.4.10.0050.00516.65
7.4.00.0060.00316.50

preferences:
60.15 ms | 403 KiB | 5 Q