[svn:PHP-Sandwich] rev 1328 - PHP-Sandwich/trunk/t

[email protected] 29 Jun 2005 01:12:47 -0000
Newsgroups perl.php.sandwich.dev
Message-ID <[email protected]>
Author: gschlossnagle
Date: Tue Jun 28 18:12:47 2005
New Revision: 1328

Added:
   PHP-Sandwich/trunk/t/20.t   (contents, props changed)
Log:
this segfaults, but shouldnt

Added: PHP-Sandwich/trunk/t/20.t
==============================================================================
--- (empty file)
+++ PHP-Sandwich/trunk/t/20.t	Tue Jun 28 18:12:47 2005
@@ -0,0 +1,38 @@
+#!/opt/ecelerity/3rdParty/bin/perl
+use strict;
+
+use PHP;
+use PHP::Interpreter;
+
+use Data::Dumper;
+
+my $p = PHP::Interpreter->new();
+
+my $foo = Foo->new();
+$foo->addInterp;
+
+$foo->upper();
+
+
+package Foo;
+
+sub new {
+  my $self = shift;
+  my $class = ref($self) || $self;
+  bless {}, $class;
+}
+
+sub addInterp {
+  my $self = shift;
+  my $p = PHP::Interpreter->new;
+  $self->{php} = $p;
+}
+
+sub upper {
+  my $self = shift;
+  my $p = $self->{php};
+  print "calling invalid code\n";
+  print $p->strln('george');
+}
+
+1;