3v4l.org

run code in 300+ PHP versions simultaneously
<?php function __( $content ) { return $content; } class WP_Locale { public $weekday; public function __construct() { $this->init(); $this->register_globals(); } public function init() { // The weekdays. $this->weekday[0] = /* translators: Weekday. */ __( 'Sunday' ); $this->weekday[1] = /* translators: Weekday. */ __( 'Monday' ); $this->weekday[2] = /* translators: Weekday. */ __( 'Tuesday' ); $this->weekday[3] = /* translators: Weekday. */ __( 'Wednesday' ); $this->weekday[4] = /* translators: Weekday. */ __( 'Thursday' ); $this->weekday[5] = /* translators: Weekday. */ __( 'Friday' ); $this->weekday[6] = /* translators: Weekday. */ __( 'Saturday' ); } public function register_globals() {} } // Should not throw a notice for: // Notice: Trying to access array offset on value of type null. $wp_locale = new WP_Locale(); var_dump( $wp_locale->weekday );

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.0060.00916.63
8.3.50.0170.00316.44
8.3.40.0140.00420.33
8.3.30.0070.00718.53
8.3.20.0150.00024.18
8.3.10.0050.00324.66
8.3.00.0080.00026.16
8.2.180.0070.01416.63
8.2.170.0210.00018.92
8.2.160.0080.00622.96
8.2.150.0080.00025.66
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0070.00021.03
8.2.110.0030.00620.53
8.2.100.0030.00820.45
8.1.280.0110.00325.92
8.1.270.0040.00424.66
8.1.260.0050.00226.35
8.1.250.0000.00828.09
8.1.240.0110.00018.49
8.1.230.0030.00718.53
7.4.330.0050.00216.30

preferences:
44.5 ms | 400 KiB | 5 Q