~ubuntu-branches/ubuntu/utopic/php-codesniffer/utopic-proposed

« back to all changes in this revision

Viewing changes to PHP_CodeSniffer-1.5.3/CodeSniffer/Standards/Squiz/Tests/PHP/InnerFunctionsUnitTest.inc

  • Committer: Package Import Robot
  • Author(s): David Prévot
  • Date: 2014-07-21 14:42:41 UTC
  • mto: This revision was merged to the branch mainline in revision 7.
  • Revision ID: package-import@ubuntu.com-20140721144241-t0v9knmgtzftbsw6
Tags: upstream-1.5.3
Import upstream version 1.5.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
function outer()
 
3
{
 
4
    if (!function_exists('inner')) {
 
5
        function inner() {
 
6
        }
 
7
    }
 
8
}
 
9
 
 
10
// Closures are allowed.
 
11
function myFunc($foo)
 
12
{
 
13
    $callback = function ($bar) use ($foo)
 
14
                {
 
15
                    $bar += $foo;
 
16
                };
 
17
}
 
18
?>