hey guys so im trying to learn a thing or two about error handling and stumbled across exceptions if I throw an

LastInstance()

php-bot: tell iflyhigh about typing english

dude where you a hall monitor in elementary school

Keep being a dick, you'll really be banned.
All you gotta do is not do it again, follow the rules, and pretend it never happened, but no.. you've gotta go ahead and be a dick.

yeah, I'm thinking about doing something like that, just involves a bit of complication and storing a large number of objects

In PHP 5, objects are stored by reference so "storing a large number of objects" isn't very intense.

well it sounds like you only need a random instance, so storing the last instance would be your best bet.

speaking of which, does anyone know how much memory storing a class with no class variables and only methods takes?
seems like you answered my question

Has anyone done the Zend exam and found it valuable?

i've interviewed a lot of people that have taken the zend exam and haven't found most of the valuable enough to hire
if that's any helo
err help

JonathanJooped, it makes you concentrate on more of PHP than you normally would
uh, widens your concentration that is

Yeah I found that… I mean I knew objects already but I seem to know off by heart tonnes m ore functions

It doesn't matter how many functions you memorized.

True… makes you quicker though

I find a good IDE can speed you up just as much as memorising functions and class names

JonathanJooped, it's all about applying problems to PHP in the fastest, most effecient and well designed way as you can

If the Zend CE tests you on how many functions you memorized… that'd be a waste of money and time.

which affirms the point i was making earlier.

Yeah..,. but thats all I learnt from it. The rest I knew I think

From what I understand its more about problem solving then memorising functions

no, it's not

Some of it was yes

its really an exercise in how much you know about php, not just functions but some of the less known gotchas etc

I didn't learn that though and the guide was pretty poor
that sounds about right

but then that is what a certification should be about

I don't use an IDE though perhaps that's my pitfall

its a php certificate after all, not a software development cert.

like funky statements (stristr(PHP_OS, 'WIN') === false ? false : true)

if you're a good software developer you'll be a good PHP developer
the opposite is very true

the opposite is not true

I learnt a little on SQLLite that I didn't know

just because you know php inside out does not mean you can write good software

iflyhigh, I mean "if you're a bad software developer your going to be a bad PHP developer"

amen
oh

hi
how can i parse xml data with php without using global vars?

i thought you meant a good php developer means a good software developer

CAiRO_, simplexml

it requires php5
i should have added "with php4"

CAiRO_, PHP 4 is nearly depreciated, use PHP 5 instead

you should be using php5 by now

Make your own parser

you could argue that to be a truly good php dev you must be a good software dev

Support for PHP 4 will be discontinued at 2007-12-31. Please consider upgrading to PHP 5.2.

it's like "I want to add NOS to my citroen c2v" then ignoring the fact that it's 40 years old and has a 0.8L engine

usually you cannot decide which php version your provider installs

i would argue it. i've interviewed 32 people in the last three weeks. the only notables are people who came from other languages. people specifically focused on php were, for the most part, not hirable. or hirable, but would require some baby sitting for awhile.

It depends on you're using PHP. If you're designing your web applications with reusable components using OO design principals and constructs then you're definitely a good software developer.

surely you do that when you pick your provider CAiRO_

hassle them untill they upgrade it

If you're using the procedural aspects of PHP to "get things done" in the most uninspiring and sloppy way, then probably not.

amen.
^ consty

but that doesn't mean that the php devs you interviewed were good php devs…

iflyhigh, same goes here, and it's been suggested at PHP London that it's better to hire .NET, C++ or Java developers and move them to PHP instead of hiring PHP developers
simply because PHP is mind-rotting if you start off with it

Consty, that implies procedural code is bad code. which just isn't true. it's possible to write godawful OO code too.

a bit like Visual Basic

I agree, I used procedural all the time when I learnt OOP and some of the harder aspects of PHP I found all other languages easy too

my point is only that the logic and thought process that is required to do good php programming is the same as the logic and thought process for another language

I have extension=oci8.so under my /etc/php4/cli/php.ini but when I do pear install MDB2_Driver_oci8 I get extension oci8 must be installed. What can I do?

i agree with that. i wouldn't say it's mind rotting, it's just not a well designed language.
which is actually it's strength
and weakness

so it's a piled together piece of crap?

I said specifically using procedural code to do X. Not that procedural alone can't be used in a constructive and easily maintainable way.

that just works well

like javascript

agreed
i dunno, i think as3 or ecma script 3 has a leg up on php in terms of language design.

well yeah
but javascript as it exists now

as3 is quite nice

yeah

things like "implied global scope"

hi

that is, if you forget to put "var" when you declare a variable, it's global baby

I have a problem about unserial.
about unserialize function

namespaces and import. although I'm not certain that would work well and the namespace stuff they want to put in 6 is god awfil
awfil = awful
sorry kuja

consty, my point is a good software developer is not limited to 1 idea or methodology

I'm not really convinced that hiring a .NET or Java programmer would be better than someone who has experience with web development. It's very different and also uses several languages and technologies together to get the job done. When people get out of college generally with an associates they
have no clue how to even effectively develop in one language let alone working with many harmoniously
Agreed.

pear/MDB2_Driver_oci8 requires PHP extension "oci8", but I have it on my php.ini

A good software developer knows about scalability and thinking with their head not fingers

And on phpinfo() I have oci8 info

yeah, the trick is to have libraries do all your html generationm
s/m$//

Consty, I'm talking about professional .NET or Java developers who know how the technology works
Consty, not just "I do this and a pretty form appears"

haha, though isn't it sad that generally that's how people are taught in college?
So sad

I used to do technical support for some college lecturers… and ended up writing half of their coursework

harryR want to come work in nyc

what i learned in college has helped me solve many problems in good ways

nah, I wouldn't move to america on a bet right now

Is anyone taking a .NET or Java class right now?

no, but I was a .NET developer for 5+ years

Where do you live?

I took a self taught AP one on Java

6 years
beta 1

Consty, UK… and bearly managing to live here without being annoyed at the government constantly

SAX doesn't use global vars does it and works in PHP 4… no?

At least you have universal health care. Be happy about that.

in the USA I'd probably get arrested very quickly

People in my country just keep getting fatter and dying.

yay, natural selection ftw

:P

can we have more guns in america… like a OLPC project.. but OGPC (one gun per child)

imagecopy(): supplied argument is not a valid Image resource
is that talking about the 1st argument
?

DrJ, it could be either

yes

$im = imagecreate($w / 10,$h) or die('Cannot initialize new GD image stream');
imagecopy($im,$dir . $i,0,0,$pos,0,$w / 10,$h);

DrJ, _both_ have to be valid resources

I've actually considered moving to the UK or Canada.

oh nvm
I see

your 2nd parameter isn't an image

I have to load the image to copy from to a resource

Consty, go to canada first, you'll have a better chance of faking that you're canadian if you move to europe
less arguments & less trouble

please do. gtfo if you hate it so much

hah
`cb: sure

hey all, can anybody point me in the direction of a nice MIME decoder please?

phpboy, what's a MIME decoder?

i think swiftmailer has one, but maybe it's just an encoder
alright night night.

phpboy, I wrote my own, it showed me how some systems abuse the standards

ack :-(

I just wanna take the mail apart and get it's contents, attachments and ofcourse header details(subject, to, from… etc)

http://www.php.net/mailparse

phpboy, its fun !

thanks subj
what's fun?

trying to work out standards abuse

sorry stupid question but how to toggle boolean?

I'm gonna have to build into PECL support which is gonna take ages :T
boolean for what?

if(boolean == true) boolean = false; else boolean = true; works but i bet there was something boolean != boolean ??

oh wait
the wonder of ports

whew, just spent an hour trying to simplify a task by having php do it for me
still saved time though
probably would've taken a day or so

oh yeah?
whats that

extracting numbers from a ton of png files

I don't suppose you have a handy script that uses these mailparse functions that'll allow me to read an email as if it was read in an email client?

they all had 0-9, I wanted each number in their own file and folder

no

now I have like 100 different styles for my counter script

porn?

i wrote my last webmail client about 10 years ago - in Perl :-)

maybe
have not looked through all of them

subj:
I love you guys

heres a question, is it 'Sitemap' or 'Site Map'?

`cb, thats like asking "is it 'colour' or 'color'"

hihi

i prefer Sitemap

not really. the correct spelling in normal countries, is 'colour'

maybe, but the correct spelling in the bestest country in the world is color

hm.. i thought that colour was british english and color is US english? :-/

T-Start: it is

T-Start, it is, but i'm Welsh and use color

hey guys, so i'm trying to learn a thing or two about error handling and stumbled across exceptions… if I throw an exception in a try {} block… will that prevent the rest of the code underneath the exception from being run? or once the exception handler finishes, it goes back to the same
line of code where the exception was thrown from?

also, is there a better way of coding error handling that anybody can suggest besides exceptions? i seem to remember them from a first year university java class… but really don't know if they've fallen out of favor
i mean, that was years ago..

exceptions are fine, so long as you are sure to be using php5

positive
i mean, instead of using exceptions, should I be using trigger_error() in conjunction with set_error_handler? should I be using PEAR

 JSP Web Hosting | JSP Hosting

*
To prove that you're not a bot, enter this code
Anti-Spam Image

Leave a Comment

You must be logged in to post a comment.


Blog Tags:

Similar posts: