IRC Networks
Irc Logs Stats
Start date: 2007-09-27 02:48:27
Last update: 2008-10-24 20:19:38
Channels: 41
Logged Lines: 6230436
Size: 1952.29 MB
Powered by
Channel Info
Network: freenodeChannel: #php |
Search in www.irclog.org
Log from #php at freenode 2006-07-19
Pages: 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
49
50
51
52
53
Next >
[00:00]<grgj2jv>The difference between include and require is that the script will stop running if it fails on the require
[00:00]<wyr>what about if you have require_once on index.php and require_once on thingy.php, and on index.php you include thingy.php?
[00:00]<jufyzg|wjzc>wig, it'll cover that.
[00:00]<jufyzg|wjzc>Only one load of thingy.php
[00:00]<wyr>all right
[00:00]<wyr>so it's like #ifndef and stuff in C++ right? (not sure if that's in C too)
[00:01]<mzzcl>What if in index.php you require_once 'index.php'? ;)
[00:01]<suv9w9>what do you do? resolving http-root relative paths by appending DOC_ROOt on demand, or requiring DOC_ROOT from the very start?
[00:01]<||aw>no the last incldue isn't a "once" it'll flip
[00:01]<wyr>MarkL...that's a good as question
[00:01]<jufyzg|wjzc>MarkL, I suppose it would behave as you told it to.
[00:01]<jufyzg|wjzc>Let's try it though.
[00:02]<m2n>How do I print out the version for my current PostgreSQL version? <?php echo substr(mysql_get_server_info(), 0, 3 ); ?> prints out it for MySQL.
[00:03]<mzzcl>Use pg_version() ?
[00:03]<gudysv>of all else fails, you can always `echo exec("pgsql --version");`
[00:03]<gudysv>pg_version, even better!
[00:03]<z0jsvnz>if I have a $result = function_call(x)
[00:03]<z0jsvnz>if (!result) {
[00:03]<gudysv>if you're going to paste code, please use a bin
[00:04]<z0jsvnz>does taht mean that the !result will not run if no value is returned from function call or if it's false?
[00:04]<z0jsvnz>or both?
[00:04]<z0jsvnz>i'm very confused.
[00:06]<wdrrvs>I need to do an array search that does: search the array for a case where the array_item->id == some number
[00:06]<rfnwn>it means if it returns false which it will if it doesnt run either
[00:06]<mzzcl>if the function returns false, 0 or doesn't return a value then if(!$result) will be true
[00:06]<z0jsvnz>ahh
[00:06]<z0jsvnz>thanks.
[00:07]<wdrrvs>?
[00:08]<mzzcl>wycats: Use foreach() or see php.net/array_search user comments for multi dimensional solutions
[00:09]<wdrrvs>kk
[00:12]<wdrrvs>http://hashphp.org/pastebin?pid=7599
[00:12]<wdrrvs>would something like that work?
[00:13]<mzzcl>Not quite.
[00:13]<jufyzg|wjzc>First time I've seen the "endforeach;" syntax used.
[00:13]<mzzcl>$item[$param]
[00:13]<mzzcl>Julian|Work: Me too
[00:14]<jufyzg|wjzc>wycats, are you looping through an array or a class?
[00:14]<yvzn2rf>yuck, i've seen endforeach; like... 3 times in the past 5 years
[00:14]<wdrrvs>an array of class elements
[00:14]<jufyzg|wjzc>Well the class will fail anyhow
[00:14]<wdrrvs>it seems to work
[00:14]<mzzcl>oh..an array of class elements .. new information .. :o
[00:14]<jufyzg|wjzc>Nah, I think how you have it is fine, if that's what you're doing.
[00:14]<jufyzg|wjzc>You didn't specify that before. ;)
[00:14]<wdrrvs>;)
[00:14]<wdrrvs>sorry
[00:14]<wdrrvs>I haven't done heavy php in a while
[00:14]<wdrrvs>cleaning up someone's mess ;)
[00:15]<wyr> if (!($query = mysql_query("SELECT DATE_FORMAT(STR_TO_DATE(SessionStart, '%m%d%Y'), '%M %D %Y'), DATE_FORMAT(STR_TO_DATE(SessionEnd, '%m%d%Y'), '%M %D %Y') FROM `session` WHERE SessionID = '$SessionID'"))) {
[00:15]<wyr>that doesn't seem to work
[00:15]<wdrrvs>I'm using Trax's AR layer
[00:15]<wdrrvs>so I have to convert a lot of the code...
[00:15]<wdrrvs>that said... it's paying off in readability
[00:15]<jufyzg|wjzc>wig, break it apart and test it piece by piece.
[00:15]<cyffnzslrd>MarkL, that reg expression is breaking when the string has a newline in it
[00:15]<cyffnzslrd>know how I can fix that?
[00:16]<mzzcl>killerspam: Try ~regex here~s
[00:17]<cyffnzslrd>'~<!-- ADMIN -->.*?<!-- END ADMIN -->~' so '~<!-- ADMIN -->~.*?~<!-- END ADMIN -->~' ?
[00:17]<mzzcl>no, $foo = preg_replace('~that regex here~s', '', $foo);
[00:17]<mzzcl>Just add the s after the last ~
[00:17]<jufyzg|wjzc>Just add an s to the end of it.
[00:17]<cyffnzslrd>ah right
[00:17]<cyffnzslrd>sorry
[00:18]<jufyzg|wjzc>"If this modifier is set, a dot metacharacter in the pattern matches all characters, including newlines. Without it, newlines are excluded."
[00:18]<wdrrvs>There's no way to extend the core classes, right?
[00:18]<fjzdfzdnz>hello. how can i check if the url is http or https ?
[00:19]<wdrrvs>by that I mean, make an array do more stuff
[00:19]<mzzcl>lordlamer: php.net/parse_url see the scheme element
[00:19]<cyffnzslrd>I see, thats a modifier that includes newlines
[00:19]<cyffnzslrd>thanks a lot
[00:20]<fjzdfzdnz>MarkL: thx
[00:20]<mzzcl>wycats: You'll need to expand on 'make an array do more stuff'
[00:21]<mzzcl>wycats: You mean add new methods dynamically to the objects in this array of yours?
[00:21]<yzrvyc>I am way confused. In javascript objects are moreorless associative arrays, now I can serialize my associative array in PHP into JSON easily. But the xml serializer i'm using wants an object and not an array. Do I have to define a class and make an object out of my assoc array or can i somehow do it on the fly?
[00:21]<sddvr2>hello
[00:21]<sddvr2>i just compiled php-4.4.2
[00:21]<sddvr2>and i dont have phpize command
[00:22]<sddvr2>any ideas what is wrong?
[00:22]<yzrvyc>what is phpize?
[00:22]<sddvr2>http://www.php.net/manual/en/install.pecl.phpize.php
[00:22]<ayzzsvnz_>wheeeeaa
[00:22]<kdrg>so... __get and __set have to be set on each child class? cannot just be set on the parent class?
[00:22]<ayzzsvnz_>guess who's back!
[00:22]<ayzzsvnz_>Wolfpaws: miss me? :P
[00:22]<mzzcl>symtab: This is from the source download at php.net right? Not source OS src package?
[00:22]<sddvr2>MarkL, right
[00:23]<sddvr2>i built a rpm for an old system (i cant upgrade the system)
[00:23]<wjlllrws>woof :)
[00:23]<wjlllrws>jiggster: Where ate the pictures?
[00:23]<ayzzsvnz_>argh :P 50 some pics
[00:23]<mzzcl>symtab: And phpize in in /path/to/source/scripts ok?
[00:23]<wjlllrws>jiggster: Gimme
[00:23]<wjlllrws>:)
[00:23]<yzrvyc>or is there a JSON2XML converter out there?
[00:23]<ayzzsvnz_>need time to resize em and stuff, i just got back from running some errands
[00:23]<sddvr2>MarkL, let me check
[00:23]<sddvr2>1 sec
[00:24]<ayzzsvnz_>i was out in the mustang, took my mom, we ended up getting a cd stuck in the cd player :P so i had to tweezer it out
[00:25]<fjzdfzdnz>MarkL: and where did i get the hole url with that my script was opened?
[00:25]<sddvr2>MarkL, /usr/src/redhat/BUILD/php-4.4.2/build-cgi/scripts/phpize







