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;

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.5.30.0080.00919.73
8.5.20.0110.00618.07
8.5.10.0100.00818.57
8.5.00.0220.00716.60
8.4.180.0140.00819.43
8.4.170.0160.00820.67
8.4.160.0300.01020.06
8.4.150.0350.00919.48
8.4.140.0300.00417.53
8.4.130.0310.00817.63
8.4.120.0390.00817.73
8.4.110.0350.01017.53
8.4.100.0420.00617.58
8.4.90.0340.00617.70
8.4.80.0200.00317.66
8.4.70.0340.01217.75
8.4.60.0340.01317.65
8.4.50.0330.01017.72
8.4.40.0520.00417.60
8.4.30.0450.00917.84
8.4.20.0510.01217.71
8.4.10.0190.00417.78
8.3.300.0120.00820.70
8.3.290.0330.01018.21
8.3.280.0340.01018.13
8.3.270.0370.01016.68
8.3.260.0370.00716.62
8.3.250.0420.00616.35
8.3.240.0360.00916.75
8.3.230.0390.00716.61
8.3.220.0310.01316.73
8.3.210.0400.00816.52
8.3.200.0340.01216.43
8.3.190.0380.00516.63
8.3.180.0430.00516.60
8.3.170.0370.01116.40
8.3.160.0410.00616.62
8.3.150.0390.00816.39
8.3.140.0370.01016.51
8.3.130.0350.00816.65
8.3.120.0340.00916.54
8.3.110.0360.01016.57
8.3.100.0390.00816.68
8.3.90.0430.00916.48
8.3.80.0470.01716.38
8.3.70.0390.00916.71
8.3.60.0430.00516.57
8.3.50.0350.01116.53
8.3.40.0380.00617.70
8.3.30.0300.00817.76
8.3.20.0230.01317.93
8.3.10.0260.01117.80
8.3.00.0290.00717.91

preferences:
45.27 ms | 717 KiB | 5 Q