3v4l.org

run code in 300+ PHP versions simultaneously
<?php $test = json_encode([ 'longname' => 'Office of the Attorney General - Department for Children & Families', 'list' => [ 'Thomas Allingham', 'Leslie Hanafin', 'Karen K. Reynolds', 'Robert Lees', 'Cindy Maguire', 'Julie Kolinich', 'Wendy Burroughs', 'Edward Kenney', 'Jody Racht', 'Marcia Garlisi', 'Deborah Celis', 'Ashley Harriman', 'Susan Cay', 'Zachary Martin', ], ], JSON_UNESCAPED_SLASHES); echo $test; exit; $jobRe = 'TEST NAME; 2025-08-20; 495035'; $re = explode(';', $jobRe); echo $re[0]; echo "\n"; echo $re[1]; echo "\n"; echo $re[2]; echo "\n"; $namearr = explode(' ', trim($re[0])); //$namearr = explode(' ', $re[0]); $firstname = $namearr[0]; echo $firstname; echo "\n"; $lastname = array_pop($namearr); echo $lastname; echo "\n"; $inmateshort = strtoupper($lastname . ', ' . substr($firstname, 0, 1)); $inmatelong = strtoupper($lastname . ', ' . $firstname); echo $inmateshort; echo "\n"; echo $inmatelong;
Output for git.master, git.master_jit
{"longname":"Office of the Attorney General - Department for Children & Families","list":["Thomas Allingham","Leslie Hanafin","Karen K. Reynolds","Robert Lees","Cindy Maguire","Julie Kolinich","Wendy Burroughs","Edward Kenney","Jody Racht","Marcia Garlisi","Deborah Celis","Ashley Harriman","Susan Cay","Zachary Martin"]}

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:
39.3 ms | 718 KiB | 4 Q