adam9110 Posted June 10, 2007 Share Posted June 10, 2007 Here is the code which is available in php5 $this->parent_supplier = new supplier($this->parent_group->get_parent_supplier()->supplier_id); But when i try in pHP4 , get Parse error: parse error, unexpected T_OBJECT_OPERATOR How to modify these code to match PHP4 syntax? Thanks very much.. Link to comment https://forums.phpfreaks.com/topic/54944-how-to-enable-php5-code-to-match-php4-syntax/ Share on other sites More sharing options...
adam9110 Posted June 10, 2007 Author Share Posted June 10, 2007 original code is: function get_parent_supplier(){ if(is_object($this->parent_group)){ if(is_object($this->parent_supplier)){ return $this->parent_supplier; } else { $this->parent_supplier = new supplier($this->parent_group->get_parent_supplier()->supplier_id); return $this->parent_supplier; } } else { $this->parent_group = new supplier_admin_group($this->supplier_admin_group_id); $this->parent_supplier = new supplier($this->parent_group->get_parent_supplier()->supplier_id); return $this->parent_supplier; } } Link to comment https://forums.phpfreaks.com/topic/54944-how-to-enable-php5-code-to-match-php4-syntax/#findComment-271731 Share on other sites More sharing options...
adam9110 Posted June 10, 2007 Author Share Posted June 10, 2007 any help will be very much appreciated... THanks to everybody... Link to comment https://forums.phpfreaks.com/topic/54944-how-to-enable-php5-code-to-match-php4-syntax/#findComment-271777 Share on other sites More sharing options...
Daniel0 Posted June 12, 2007 Share Posted June 12, 2007 Try $parent_supplier = $this->parent_group->get_parent_supplier(); $this->parent_supplier = new supplier($parent_supplier->supplier_id); Link to comment https://forums.phpfreaks.com/topic/54944-how-to-enable-php5-code-to-match-php4-syntax/#findComment-273238 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.