3v4l.org

run code in 300+ PHP versions simultaneously
<?php $re = '/(EC)\w{2}|(CC)\w{2}|\w(F)\w{2}|(LT)\w{2}|\w(T)\w{2}/'; $str = 'STAR'; preg_match($re, $str, $matches); // Remove empty values and reset keys $cat = array_values(array_filter($matches)); $categories = [ 'CB' => 'Compact', 'CC' => 'Compact', 'CD' => 'Compact', 'EB' => 'Economy', 'EC' => 'Economy', 'ED' => 'Economy', 'IB' => 'Mid-Size', 'IC' => 'Mid-Size', 'ID' => 'Mid-Size', 'PB' => 'Premium', 'PC' => 'Premium', 'PD' => 'Premium', 'SB' => 'Standard', 'SC' => 'Standard', 'SD' => 'Standard', '0L' => 'Luxury', 'F' => 'SUV', '1G' => 'Crossover', '1K' => 'Commercial', '1P' => 'Pickup Truck', '1Q' => 'Pickup Truck', '1R' => 'RV', '1S' => 'Sports', 'T' => 'Convertible', '1V' => 'Van', '1W' => 'Wagon', '3H' => 'Hybrid', '3I' => 'Hybrid', '3C' => 'Electric', '3E' => 'Electric', ]; //Echo category Echo $categories[$cat[1]];
Output for git.master, git.master_jit, rfc.property-hooks
Convertible

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:
29.91 ms | 405 KiB | 5 Q