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 );
Output for git.master, git.master_jit, rfc.property-hooks
array(7) { [0]=> string(6) "Sunday" [1]=> string(6) "Monday" [2]=> string(7) "Tuesday" [3]=> string(9) "Wednesday" [4]=> string(8) "Thursday" [5]=> string(6) "Friday" [6]=> string(8) "Saturday" }

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
51.99 ms | 405 KiB | 5 Q