<?php
// Global variable referenced by following function.
// If we had another function that used this name, now it'd be an array and it could break it.
$name = 'Ryan McDermott';
function splitIntoFirstAndLastName() {
$name = preg_split('/ /', $name);
}
splitIntoFirstAndLastName();
var_dump($name); // ['Ryan', 'McDermott'];
Warning: Undefined variable $name in /in/pmVQM on line 8
Deprecated: preg_split(): Passing null to parameter #2 ($subject) of type string is deprecated in /in/pmVQM on line 8
string(14) "Ryan McDermott"
Output for 8.0.0 - 8.0.30
Warning: Undefined variable $name in /in/pmVQM on line 8
string(14) "Ryan McDermott"