Hyvor Developer
  Home   Download   Copy
Code
<?php
$x = $a ?? 2;
var_dump($x);

// $a ?? 2 is equal to the following code
if (isset($a)) {
	return $a;
} else {
	return 2;
}
Result