3v4l.org

run code in 300+ PHP versions simultaneously
<?php function display_post( $postdata ) { echo "<div class='post'>"; echo "<h1>" . $postdata['post_title'] . "</h1>"; echo "<p>" . $postdata['post_excerpt'] . "</p>"; echo "<div class='post-meta'>Published on " . $postdata['post_date'] . " by " . $postdata['post_author'] . "</div>"; echo "</div>"; } $posts = array( 0 => array( "post_title" => "My First Post", "post_excerpt" => "This is a short snippet of text from the first post", "post_date" => "2015 December 1", "post_author" => "Daniel Pataki" ), 1 => array( "post_title" => "Second Post", "post_excerpt" => "Short exceprt for post number 2", "post_date" => "2015 December 4", "post_author" => "Raelene Morey" ) ); foreach( $posts as $post ) { display_post( $post ); }

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.0090.00918.43
8.3.50.0070.00716.35
8.3.40.0180.00418.67
8.3.30.0080.00618.56
8.3.20.0050.00319.11
8.3.10.0040.00421.85
8.3.00.0080.00019.47
8.2.180.0110.00818.54
8.2.170.0090.00922.96
8.2.160.0120.00320.41
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0070.00020.57
8.2.120.0000.00826.35
8.2.110.0090.00022.23
8.2.100.0070.00417.78
8.2.90.0040.00418.47
8.2.80.0080.00018.96
8.2.70.0060.00317.75
8.2.60.0040.00418.03
8.2.50.0000.00918.07
8.2.40.0020.00518.28
8.2.30.0040.00418.14
8.2.20.0040.00418.01
8.2.10.0040.00418.12
8.2.00.0020.00518.11
8.1.280.0040.01125.92
8.1.270.0080.00023.90
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0030.00623.84
8.1.230.0090.00319.15
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0060.00317.23
8.1.190.0000.00817.23
8.1.180.0000.00818.10
8.1.170.0040.00418.59
8.1.160.0050.00318.90
8.1.150.0000.00820.61
8.1.140.0080.00319.49
8.1.130.0050.00218.90
8.1.120.0030.00417.37
8.1.110.0000.00917.37
8.1.100.0000.00817.52
8.1.90.0040.00417.36
8.1.80.0030.00817.46
8.1.70.0000.00717.38
8.1.60.0040.00417.58
8.1.50.0000.00817.44
8.1.40.0060.00617.59
8.1.30.0040.00417.54
8.1.20.0040.00417.70
8.1.10.0000.00817.46
8.1.00.0040.00417.45
8.0.300.0000.00818.77
8.0.290.0000.00716.75
8.0.280.0070.00018.37
8.0.270.0040.00417.32
8.0.260.0060.00316.75
8.0.250.0030.00316.95
8.0.240.0060.00316.92
8.0.230.0050.00216.98
8.0.220.0060.00316.91
8.0.210.0040.00416.84
8.0.200.0080.00016.86
8.0.190.0050.00316.84
8.0.180.0040.00416.84
8.0.170.0000.00716.95
8.0.160.0060.00316.88
8.0.150.0030.00516.82
8.0.140.0030.00416.79
8.0.130.0000.00813.27
8.0.120.0030.00516.77
8.0.110.0000.00716.74
8.0.100.0020.00516.85
8.0.90.0040.00416.79
8.0.80.0070.01116.95
8.0.70.0040.00416.77
8.0.60.0070.00016.97
8.0.50.0040.00416.80
8.0.30.0040.01217.21
8.0.20.0100.01017.40
8.0.10.0000.00717.05
8.0.00.0070.01017.00
7.4.330.0050.00015.55
7.4.320.0030.00316.49
7.4.300.0000.00716.50
7.4.290.0060.00316.51
7.4.280.0000.00816.49
7.4.270.0000.00816.62
7.4.260.0070.00016.51
7.4.250.0040.00416.50
7.4.240.0030.00416.54
7.4.230.0000.00716.71
7.4.220.0060.01216.55
7.4.210.0090.00616.63
7.4.200.0030.00316.49
7.4.160.0150.00516.68
7.4.150.0140.00317.40
7.4.140.0120.00917.86
7.4.130.0120.01216.49
7.4.120.0130.00716.56
7.4.110.0100.01416.61
7.4.100.0140.00616.60
7.4.90.0080.00816.54
7.4.80.0110.01119.39
7.4.70.0100.01316.63
7.4.60.0030.01516.66
7.4.50.0100.00016.50
7.4.40.0100.00616.55
7.4.30.0100.00716.60
7.4.00.0070.00714.95
7.3.330.0000.00613.34
7.3.320.0000.00513.25
7.3.310.0030.00316.27
7.3.300.0000.00716.39
7.3.290.0000.00716.29
7.3.280.0110.00716.32
7.3.270.0140.00417.40
7.3.260.0070.01016.43
7.3.250.0160.00816.41
7.3.240.0080.01016.47
7.3.230.0070.01716.36
7.3.210.0130.00716.30
7.3.200.0040.02016.55
7.3.190.0090.00616.52
7.3.180.0060.00916.47
7.3.170.0030.01516.39
7.3.160.0070.00916.45
7.2.330.0090.00716.50
7.2.320.0090.00916.73
7.2.310.0180.00416.46
7.2.300.0100.00616.59
7.2.290.0080.01316.48
7.2.00.0050.00319.39
7.1.200.0070.00715.65
7.1.100.0060.00618.24
7.1.70.0030.01017.22
7.1.60.1400.01033.42
7.1.50.2200.01332.97
7.1.40.1870.00032.79
7.1.30.2300.00732.42
7.1.20.1470.01332.80
7.1.10.1600.01314.91
7.1.00.2800.00714.54
7.0.200.1630.01314.94
7.0.190.1930.00714.85
7.0.180.1670.01314.38
7.0.170.3130.01314.36
7.0.160.2000.01714.45
7.0.150.1800.00714.38
7.0.140.2100.01014.50
7.0.130.2200.00714.74
7.0.120.2470.02014.62
7.0.110.1600.00714.36
7.0.100.1500.01014.42
7.0.90.2700.01014.47
7.0.80.2100.01014.52
7.0.70.1630.00714.21
7.0.60.1800.00314.20
7.0.50.1630.00014.67
7.0.40.1570.00714.61
7.0.30.1500.01314.60
7.0.20.1870.01314.54
7.0.10.1570.01314.52
7.0.00.1500.01014.54

preferences:
50.72 ms | 400 KiB | 5 Q