r76050 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r76049‎ | r76050 | r76051 >
Date:22:23, 4 November 2010
Author:reedy
Status:deferred
Tags:
Comment:
Code looks like nothing more than some "test" files
Modified paths:
  • /trunk/extensions/Wikidata/OmegaWiki/small/functionvar.php (deleted) (history)
  • /trunk/extensions/Wikidata/OmegaWiki/small/overload.php (deleted) (history)
  • /trunk/extensions/Wikidata/OmegaWiki/small/staticarray.php (deleted) (history)

Diff [purge]

Index: trunk/extensions/Wikidata/OmegaWiki/small/functionvar.php
@@ -1,21 +0,0 @@
2 -<?php
3 -
4 -class bla {
5 -
6 -
7 - static function a( $hello ) {
8 - echo $hello;
9 - }
10 -
11 - function b() {
12 - $a = "a";
13 - $x = $this->$a;
14 - $x( "hello world" );
15 - }
16 -}
17 -
18 -$c = new bla();
19 -$c->b();
20 -
21 -
22 -?>
Index: trunk/extensions/Wikidata/OmegaWiki/small/overload.php
@@ -1,21 +0,0 @@
2 -<?PHP
3 -
4 -
5 -class bla {
6 - protected $foo = array();
7 -
8 - function __set( $key, $value ) {
9 - $this->foo[$key] = $value;
10 - }
11 -
12 - function __get( $key ) {
13 - return $this->foo[$key];
14 - }
15 -}
16 -
17 -$b = new bla();
18 -$baz = "bar";
19 -$b->$baz = "hello";
20 -echo $b->bar;
21 -
22 -?>
Index: trunk/extensions/Wikidata/OmegaWiki/small/staticarray.php
@@ -1,20 +0,0 @@
2 -<?php
3 -
4 -function sarray( $key, $value = null ) {
5 - static $foo = array();
6 - if ( is_null( $value ) )
7 - return $foo[$key];
8 - $foo[$key] = $value;
9 - return $foo[$key];
10 -}
11 -
12 -
13 -
14 -sarray( "bla", "blie" );
15 -sarray( "ready", "aim" );
16 -sarray( "fie", "fie" );
17 -sarray( "aim", "fire" );
18 -sarray( "ready", "teddy" ); // ready twice
19 -print sarray( "ready" ) . " " . sarray( "aim" );
20 -
21 -?>

Status & tagging log