How do I pass a string from a PHP field to the PHP filter? Is there any way to pass a string from php field to php filter?

on the PHP FIELD I can tell if a product has discount or not ( i think because the field formatter render the field_price in a way that triggers the discount rules) and if there is a discount I can set a variable on/off based on the output of this formatter. 

This custom discount variable created with PHP FIELD I need to pass it to the PHP FILTER to control if a product must needs to be shown or not (sorry for my bad English)

PHP FIELD CODE

&lt;?php

// $var1 will take value 0.00E or -94.99E (the last value is an example)
$var1 = strip_tags($data-&gt;field_commerce_price[0][rendered]);

// $var2 will take value 0 or -
$var2 = mb_substr($var1, 0, 1, 'utf-8');

// set $static = 0 or 1, if PHP FILTER can see this then can filter discount products
if ($var2=="-") { $static = "1"; echo "DISCOUNT!"; } else {$static = "0"; }

?&gt;


PHP FILTER CODE

// all 4 variables gives output nothing
dpm($row-&gt;_field_data['nid']['entity']-&gt;field_commerce_price[0][rendered]);
dpm($data-&gt;_field_data['nid']['entity']-&gt;field_commerce_price[0][rendered]);
dpm($data-&gt;field_commerce_price[0][rendered]);
dpm($static);

if ($static=="1") { return FALSE; } else { return TRUE;}


So how PHP field send a string to PHP FILTER??? OR
Is there any to create a filter function using the PHP FIELD?
You can copy the code from the php field and add some logic to it to return false or true depending on the result but no there is no current way to transfer it.

EDIT: This may seem a bit backwards, though if you made a $_SESSION variable as an Array() you could maybe do something with that. Maybe not very helpful. views_php has always been entirely buggy for me and it comes in handy sparingly.