3v4l.org

run code in 300+ PHP versions simultaneously
<?php // @see https://gist.github.com/adrian-enspired/385c6830ba2932bc36a2 $db = new PDO($dsn, $user, $pass, $options); $stmt = $db->prepare("INSERT INTO data (fetched_url, author) VALUES (?, ?)"); // example data $posts = [ [ 'data' => [ 'url' => 'https://hashphp.org', 'author_fullname' => 'alvisleet' ] ], [ 'data' => [ 'url' => 'https://hashphp.org', 'author_fullname' => 'alvisleet' ] ] ]; foreach ($posts as $post) { $stmt->execute([$post['data']['url'], $post['data']['author_fullname']]); }

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.1.100.0050.00517.25
8.1.90.0080.00017.34
8.1.80.0040.00417.20
8.1.70.0000.00717.22
8.1.60.0040.00417.48
8.1.50.0080.00017.46
8.1.40.0070.00017.46
8.1.30.0000.00717.50
8.1.20.0040.00417.43
8.1.10.0000.00717.52
8.1.00.0040.00417.35
8.0.230.0080.00016.88
8.0.220.0060.00316.85
8.0.210.0030.00316.73
8.0.200.0030.00316.99
8.0.190.0040.00416.96
8.0.180.0030.00616.95
8.0.170.0080.00016.83
8.0.160.0060.00316.80
8.0.150.0000.00816.73
8.0.140.0040.00416.73
8.0.130.0000.00613.27
8.0.120.0040.00416.85
8.0.110.0070.00016.68
8.0.100.0050.00216.93
8.0.90.0050.00216.87
8.0.80.0110.00316.85
8.0.70.0000.00716.91
8.0.60.0040.00417.00
8.0.50.0000.00716.95
8.0.30.0080.01017.03
8.0.20.0200.01717.13
8.0.10.0000.00717.06
8.0.00.0190.01016.68
7.4.300.0000.00616.38
7.4.290.0000.00716.33
7.4.280.0070.00016.40
7.4.270.0000.00716.36
7.4.260.0030.00416.43
7.4.250.0020.00516.31
7.4.240.0030.00616.55
7.4.230.0040.00416.41
7.4.220.0040.00416.54
7.4.210.0090.00716.54
7.4.200.0030.00316.65
7.4.160.0120.00416.42
7.4.140.0120.00917.86
7.4.130.0090.00916.58
7.4.120.0070.01716.39
7.4.110.0080.00816.41
7.4.100.0130.01016.45
7.4.90.0090.00816.43
7.4.80.0120.01219.39
7.4.70.0060.01216.33
7.4.60.0030.01316.45
7.4.50.0040.01416.22
7.4.40.0100.01316.34
7.4.00.0090.00614.95
7.3.330.0020.00212.95
7.3.320.0000.00513.08
7.3.310.0030.00316.12
7.3.300.0060.00016.34
7.3.290.0000.00716.25
7.3.280.0090.00816.24
7.3.260.0080.00916.41
7.3.240.0130.00616.26
7.3.230.0130.00316.41
7.3.210.0100.00716.47
7.3.200.0060.01216.24
7.3.190.0080.00816.33
7.3.180.0130.01016.57
7.3.170.0040.01216.56
7.3.160.0060.00916.39
7.3.120.0070.00614.88
7.3.110.0030.01414.53
7.3.100.0040.00714.93
7.3.90.0120.00314.77
7.3.80.0030.00614.91
7.3.70.0060.00914.62
7.3.60.0090.00014.71
7.3.50.0030.01014.66
7.3.40.0060.00314.88
7.3.30.0060.00714.37
7.3.20.0290.00315.47
7.3.10.0260.00715.43
7.3.00.0330.00615.73
7.2.330.0160.00016.49
7.2.320.0160.00316.33
7.2.310.0110.00516.59
7.2.300.0170.00016.68
7.2.290.0060.01816.50
7.2.250.0100.01014.80
7.2.240.0070.01014.95
7.2.230.0070.01414.98
7.2.220.0040.01414.93
7.2.210.0030.00714.81
7.2.200.0070.01114.59
7.2.190.0070.00714.75
7.2.180.0090.00314.92
7.2.170.0050.00514.77
7.2.160.0110.00914.70
7.2.150.0250.00715.79
7.2.140.0300.00215.52
7.2.130.0310.01115.70
7.2.120.0710.00915.83
7.2.110.0290.01215.79
7.2.100.0350.01015.47
7.2.90.0330.00515.72
7.2.80.0400.00515.70
7.2.70.0320.01015.52
7.2.60.0490.00215.75
7.2.50.0300.00915.73
7.2.40.0280.00815.78
7.2.30.0390.01015.73
7.2.20.0390.00815.74
7.2.10.0300.01215.73
7.2.00.0320.00715.63
7.1.330.0070.00715.75
7.1.320.0030.00615.70
7.1.310.0090.00615.58
7.1.300.0040.01115.73
7.1.290.0090.00615.80
7.1.280.0070.00415.79
7.1.270.0210.00814.41
7.1.260.0300.00714.63
7.1.250.0370.00614.45

preferences:
12.18 ms | 406 KiB | 5 Q