File: sample.texy

package info (click to toggle)
php-texy 2.6-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 680 kB
  • ctags: 1,299
  • sloc: php: 4,754; makefile: 4
file content (48 lines) | stat: -rw-r--r-- 1,023 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
Syntax highlighting in Texy!
****************************



How use clone in PHP4
---------------------

This example show how to implement PHP5 `clone` construction in older PHP4

/---code php
if (((int) phpversion() < 5) && (!function_exists('clone')))
 eval('function &clone($obj) { return $obj; }');

$obj = new Object();
$dolly = clone ($obj);
\---




And Now for Something Completely Different:
-------------------------------------------

/---code javascript
   // function trim() in JavaScript

   function trim(s) {
     while (s.substr(0, 1) == ' ') s = s.substr(1);
     while (s.substr(s.length-1, 1) == ' ') s = s.substr(0, s.length-2);
     return s;
   }
\---


/--code html
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="cs" lang="cs">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=windows-1250" />
  <title>Try Texy!</title>
\---


/--code sql

SELECT * FROM `girls` WHERE `girls`.`iq` > `dgx`.`iq` AND `girls`.`age` < `dgx`.`age` GROUP BY `girls`.`sexual-orientation`

\---