3v4l.org

run code in 300+ PHP versions simultaneously
<?php $mlbCities = array( 'Carolina', 'Atlanta', 'New Orleans', 'Philadelphia', 'St. Louis', 'Washington', 'Houston', 'Tennessee', 'New England', 'NY Jets', 'Cincinnati', 'Green Bay', 'Arizona', 'Jacksonville', 'Oakland', 'Kansas City', 'Minnesota', 'Detroit', 'Tampa Bay', 'Buffalo', 'Seattle', 'San Francisco', 'Pittsburgh', 'Chicago', 'Baltimore', 'San Diego', 'Cleveland', 'Denver', 'NY Giants', 'Dallas', 'Indianapolis', 'Miami' ); $string = 'San Francisco'; foreach($mlbCities as $city) { var_dump($city); $team = strpos($string, $city); if (!empty($team)) { echo 'Found it\r'; exit; } else { echo "Nope\r"; } } ?>
Output for git.master, git.master_jit, rfc.property-hooks
string(8) "Carolina" Nope string(7) "Atlanta" Nope string(11) "New Orleans" Nope string(12) "Philadelphia" Nope string(9) "St. Louis" Nope string(10) "Washington" Nope string(7) "Houston" Nope string(9) "Tennessee" Nope string(11) "New England" Nope string(7) "NY Jets" Nope string(10) "Cincinnati" Nope string(9) "Green Bay" Nope string(7) "Arizona" Nope string(12) "Jacksonville" Nope string(7) "Oakland" Nope string(11) "Kansas City" Nope string(9) "Minnesota" Nope string(7) "Detroit" Nope string(9) "Tampa Bay" Nope string(7) "Buffalo" Nope string(7) "Seattle" Nope string(13) "San Francisco" Nope string(10) "Pittsburgh" Nope string(7) "Chicago" Nope string(9) "Baltimore" Nope string(9) "San Diego" Nope string(9) "Cleveland" Nope string(6) "Denver" Nope string(9) "NY Giants" Nope string(6) "Dallas" Nope string(12) "Indianapolis" Nope string(5) "Miami" Nope

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:
56.16 ms | 403 KiB | 8 Q