Hi! Could we please enable some services and cookies to improve your experience and our website?
Online Sandbox for SQL and PHP: Write, Run, Test, and Share SQL Queries and PHP Code
<?php
$type = 'test';
$f1 = function($s) {echo $s . "<>" . $type; };
$f1('a');
$f2 = function($s) use($type) {echo $s . "<>" . $type; };
$f2('b');