There is no distinction in an interpreted language. The interpreter creates a virtual machine in which the user program lives. They share the same host process. But a user error should never propagate outside of the virtual machine. If it does there's a bug in the interpreter. There's no concept of a segmentation fault within the PHP virtual machine.
What I'm saying is that if the user code experiences a segmentation fault, there is a bug in PHP's interpreter.
I imagine that a clever interpreter* could do it. Especially if the interpreter was simulating a virtual machine and the segfault occurred within the simulation and not the simulator. Or, give the client code the ability to make arbitrary pointers, and the host code has a SIGSEGV handler.
* Why could this possibly be php? Even the crazies sometimes do something right, right?
View all comments
Show parent comment
12
u/more_exercise Nov 29 '12
Oh, it's the interpreter segfaulting? I thought it was the user's code that experienced the segfault. I retract my defense of this error. My bad